search for: curfn

Displaying 9 results from an estimated 9 matches for "curfn".

Did you mean: curfun
2009 Jul 01
0
[LLVMdev] [PATCH][RFC] Bug #4406: stubs for external functions should be registered even if DlsymStubs are disabled
...========================= --- lib/ExecutionEngine/JIT/JITEmitter.cpp (revision 74506) +++ lib/ExecutionEngine/JIT/JITEmitter.cpp (working copy) @@ -658,9 +658,6 @@ } void JITEmitter::AddStubToCurrentFunction(void *StubAddr) { - if (!TheJIT->areDlsymStubsEnabled()) - return; - assert(CurFn && "Stub added to current function, but current function is 0!"); SmallVectorImpl<void*> &StubsUsed = CurFnStubUses[CurFn];
2012 Dec 19
2
[LLVMdev] Function inline causes crash in clang for .ast to .s
...lang-3.2: $HOME/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp:342: void clang::CodeGen::CodeGenFunction::*StartFunction*(clang::GlobalDecl, clang::QualType, llvm::Function*, const clang::CodeGen::CGFunctionInfo&, const clang::CodeGen::FunctionArgList&, clang::SourceLocation): Assertion `*CurFn->isDeclaration() && "Function already has body?"*' failed. >From crash message it seems Codegen is already emitted for inline function. Crash occurs only if tried to generate assembly out of ast file. Regards, Rajesh -------------- next part -------------- An HTML at...
2016 Aug 17
2
CodeView and "line 0" ?
I mean, we just skip over instructions without a DebugLoc: void CodeViewDebug::beginInstruction(const MachineInstr *MI) { DebugHandlerBase::beginInstruction(MI); // Ignore DBG_VALUE locations and function prologue. if (!Asm || !CurFn || MI->isDebugValue() || MI->getFlag(MachineInstr::FrameSetup)) return; DebugLoc DL = MI->getDebugLoc(); if (DL == PrevInstLoc || !DL) return; maybeRecordLocation(DL, Asm->MF); } Seems reasonable to extend the condition with ' || DL->getLine() == 0'. I...
2009 Jul 03
0
[LLVMdev] Question about memory allocation in JIT
...ionEngine/JIT/JITEmitter.cpp      (my changes) > @@ -946,6 +947,7 @@ >   // FnEnd is the end of the function's machine code. >   uint8_t *FnEnd = CurBufferPtr; > > +  std::vector<MachineRelocation> BackupRelocations = Relocations; >   if (!Relocations.empty()) { >     CurFn = F.getFunction(); >     NumRelos += Relocations.size(); > @@ -1028,8 +1030,18 @@ >   MemMgr->endFunctionBody(F.getFunction(), BufferBegin, CurBufferPtr); > >   if (CurBufferPtr == BufferEnd) { > -    retryWithMoreMemory(F); > -    return true; > +         for (unsigned i...
2012 Dec 28
0
[LLVMdev] Function inline causes crash in clang for .ast to .s
...tools/clang/lib/CodeGen/CodeGenFunction.cpp:342: > void clang::CodeGen::CodeGenFunction::*StartFunction*(clang::GlobalDecl, > clang::QualType, llvm::Function*, const clang::CodeGen::CGFunctionInfo&, > const clang::CodeGen::FunctionArgList&, clang::SourceLocation): Assertion ` > *CurFn->isDeclaration() && "Function already has body?"*' failed. > > From crash message it seems Codegen is already emitted for inline function. > > Crash occurs only if tried to generate assembly out of ast file. > > > Regards, > Rajesh > > > &gt...
2016 Aug 17
2
CodeView and "line 0" ?
I've been playing with Fred Riss's "line 0" patch for DWARF (https://reviews.llvm.org/D16569) but in adapting it for current trunk, I find the DwarfDebug stuff has been refactored to allow either DWARF or CodeView. That's all good, but the question is whether the "line 0" patch should be DWARF-specific or common. The DWARF spec explicitly states that code not
2009 Jul 01
3
[LLVMdev] Question about memory allocation in JIT
Hello! Working with LLVM JIT-compiler I found a small bug and I'd like to correct it. Namely, on some tests LLVM fails with message "JIT: Ran out of space for generated machine code!" This error emerges because the test creates big static array. Global variables are placed into memory block for function, that is first seen using given variable. Besides, during memory allocation
2014 Aug 27
6
[LLVMdev] Minimizing -gmlt
...nly && LScopes.getAbstractScopesList().empty()) { + assert(ScopeVariables.empty()); + assert(CurrentFnArguments.empty()); + assert(DbgValues.empty()); + assert(AbstractVariables.empty()); + LabelsBeforeInsn.clear(); + LabelsAfterInsn.clear(); + PrevLabel = nullptr; + CurFn = nullptr; + return; + } // Construct abstract scopes. for (LexicalScope *AScope : LScopes.getAbstractScopesList()) { diff --git lib/CodeGen/AsmPrinter/DwarfUnit.cpp lib/CodeGen/AsmPrinter/DwarfUnit.cpp index e0be080..78ac1e6 100644 --- lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ lib/CodeG...
2014 Mar 07
3
[LLVMdev] [RFC] Add second "failure" AtomicOrdering to cmpxchg instruction
...ar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -1735,8 +1735,9 @@ ScalarExprEmitter::EmitScalarPrePostIncDec(const UnaryOperator *E, LValue LV, if (atomicPHI) { llvm::BasicBlock *opBB = Builder.GetInsertBlock(); llvm::BasicBlock *contBB = CGF.createBasicBlock("atomic_cont", CGF.CurFn); - llvm::Value *old = Builder.CreateAtomicCmpXchg(LV.getAddress(), atomicPHI, - CGF.EmitToMemory(value, type), llvm::SequentiallyConsistent); + llvm::Value *old = Builder.CreateAtomicCmpXchg( + LV.getAddress(), atomicPHI, CGF.EmitToMemory(value, type), + llvm::Sequential...