search for: getcodemodel

Displaying 13 results from an estimated 13 matches for "getcodemodel".

2008 Jan 03
2
[LLVMdev] Tailcall optimization in jit stopped working
...elativeBlockAddress(MO.getMBB()); } else if (MO.isGlobalAddress()) { - bool NeedStub = !IsStatic || + bool NeedStub = Opcode == X86::TAILJMPd || Opcode == X86::TAILJMPr || + Opcode == X86::TAILJMPm || !IsStatic || (Is64BitMode && TM.getCodeModel() == CodeModel::Large); emitGlobalAddress(MO.getGlobal(), X86::reloc_pcrel_word, 0, 0, NeedStub);
2009 Jun 10
3
[LLVMdev] Why does the x86-64 JIT emit stubs for external calls?
In X86CodeGen.cpp, the following code appears in the handler used for CALL64pcrel32 instructions: // Assume undefined functions may be outside the Small codespace. bool NeedStub = (Is64BitMode && (TM.getCodeModel() == CodeModel::Large || TM.getSubtarget<X86Subtarget>().isTargetDarwin())) || Opcode == X86::TAILJMPd; emitGlobalAddress(MO.getGlobal(), X86::reloc_pcrel_word, MO.getOffset(), 0, NeedStub); This causes every external call to be emit...
2009 Jun 11
0
[LLVMdev] Why does the x86-64 JIT emit stubs for external calls?
...sskin wrote: > In X86CodeGen.cpp, the following code appears in the handler used for > CALL64pcrel32 instructions: > > // Assume undefined functions may be outside the Small > codespace. > bool NeedStub = > (Is64BitMode && > (TM.getCodeModel() == CodeModel::Large || > TM.getSubtarget<X86Subtarget>().isTargetDarwin())) || > Opcode == X86::TAILJMPd; > emitGlobalAddress(MO.getGlobal(), X86::reloc_pcrel_word, > MO.getOffset(), 0, NeedStub); > > This causes every...
2009 Jun 11
1
[LLVMdev] [unladen-swallow] Re: Why does the x86-64 JIT emit stubs for external calls?
...;> In X86CodeGen.cpp, the following code appears in the handler used for >> CALL64pcrel32 instructions: >> >>       // Assume undefined functions may be outside the Small codespace. >>       bool NeedStub = >>         (Is64BitMode && >>             (TM.getCodeModel() == CodeModel::Large || >>              TM.getSubtarget<X86Subtarget>().isTargetDarwin())) || >>         Opcode == X86::TAILJMPd; >>       emitGlobalAddress(MO.getGlobal(), X86::reloc_pcrel_word, >>                         MO.getOffset(), 0, NeedStub); >> >&g...
2013 Jun 25
0
[LLVMdev] Contants generation - proposal
Hi Elena, > (2) Proposal > Define one more Code Model, let's say "LargeNearConst", which will allow to put constants in .text. Isn't that a little heavy-handed? The large model only requires the less efficient access for symbols we can't control, and in fact x86 still uses pc-relative conditional branches within a function so it can't pretend to support a single
2013 Jun 26
2
[LLVMdev] Contants generation - proposal
...) For X86 target JITDefault will be translated CodeModel::LargeJIT for x64 and CodeModel::Small for 32-bit. And the TargetLoweringObjectFile already has CodeModel inside. So the code will look like : const MCSection * TargetLoweringObjectFile::getSectionForConstant(SectionKind Kind) const { if (getCodeModel() == CodeModel::LargeJIT) return TextSection; if (Kind.isReadOnly() && ReadOnlySection != 0) return ReadOnlySection; return DataSection; } - Elena -----Original Message----- From: Tim Northover [mailto:t.p.northover at gmail.com] Sent: Tuesday, June 25, 2013 23:31 To: Demi...
2008 Feb 15
1
[LLVMdev] LLVM2.2 x64 JIT trouble on VStudio build
...if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee)) { // We should use extra load for direct calls to dllimported functions in // non-JIT mode. // it get's into here if ((IsTailCall || !Is64Bit || // both these are false getTargetMachine().getCodeModel() != CodeModel::Large) // this is false && !Subtarget->GVRequiresExtraLoad(G->getGlobal(), // this is short circuited away getTargetMachine(), true)) Callee = DAG.getTargetGlobalAddress(G->getGlobal(), getPointerTy());...
2013 Jun 25
2
[LLVMdev] Contants generation - proposal
Hi all, I analyzed more and ready (1) to describe the problem and (2) I have a proposal. (1) Problem description: In X86_64 target the Code Model is "Large". It means that address is 64-bit and IP-relative memory operand can't be used in this case. (Because in IP-relative memory operand the displacement is 32-bit). In order to load constant, we use 2 instructions. movabsq
2017 Aug 22
2
Subtarget Initialization in <ARCH>TargetMachine constructor
...CodeGenOpt::Level OptLevel, bool JIT) : LLVMTargetMachine(T, computeDataLayout(), TT, Cpu, FeatureString, Options, getEffectiveRelocModel(RM), getEffectiveCodeModel(CodeModel), OptLevel), Subtarget(TT, Cpu, FeatureString, *this, Options, getCodeModel(), OptLevel), TLOF(new LanaiTargetObjectFile()) { initAsmInfo(); } Note that Subtarget is created as part of constructor. On the other hard, initAsmInfo() tries to create a subtargetinfo as well. The "Subtarget" created here later on is returned through: const L...
2008 Feb 15
0
[LLVMdev] LLVM2.2 x64 JIT trouble on VStudio build
On Feb 12, 2008, at 5:26 PM, Chuck Rose III wrote: > Hola LLVMers, > > I’m debugging through some strangeness that I’m seeing on X64 on > windows with LLVM2.2. I had to change the code so that it would > engage the x64 target machine on windows builds, but I’ve otherwise > left LLVM 2.2 alone. The basic idea is that I’ve got a function bar > which is compiled by
2008 Feb 13
3
[LLVMdev] LLVM2.2 x64 JIT trouble on VStudio build
Hola LLVMers, I'm debugging through some strangeness that I'm seeing on X64 on windows with LLVM2.2. I had to change the code so that it would engage the x64 target machine on windows builds, but I've otherwise left LLVM 2.2 alone. The basic idea is that I've got a function bar which is compiled by VStudio and I'm creating another function foo via LLVM JIT which is going
2017 Aug 22
5
[RFC] mir-canon: A new tool for canonicalizing MIR for cleaner diffing.
Patch for review. On Mon, Aug 21, 2017 at 11:45 PM Puyan Lotfi <puyan.lotfi.llvm at gmail.com> wrote: > Ping. > > Still working on preparing code for review. Will have a patch for review > ready in the coming days. > > PL > > On Tue, Aug 15, 2017 at 12:06 PM Puyan Lotfi <puyan.lotfi.llvm at gmail.com> > wrote: > >> Hi, >> >> >>
2014 Nov 03
8
[LLVMdev] [PATCH] Protection against stack-based memory corruption errors using SafeStack
...safeStackPtrLocation(unsigned &AddressSpace, + unsigned &Offset) const { + if (Subtarget->isTargetLinux()) { + if (Subtarget->is64Bit()) { + // %fs:0x280, unless we're using a Kernel code model + if (getTargetMachine().getCodeModel() != CodeModel::Kernel) { + Offset = 0x280; + AddressSpace = 257; + return true; + } + } else { + // %gs:0x280, unless we're using a Kernel code model + if (getTargetMachine().getCodeModel() != CodeModel::Kernel) { + Offset = 0x280; + Address...