search for: thecontext

Displaying 12 results from an estimated 12 matches for "thecontext".

2016 Sep 14
4
setDataLayout segfault
I get a segfault with this code when setting the data layout: int main(int argc, char** argv) { llvm::InitializeNativeTarget(); llvm::LLVMContext TheContext; unique_ptr<Module> Mod(new Module("A",TheContext)); llvm::EngineBuilder engineBuilder(std::move(Mod)); std::string mcjit_error; engineBuilder.setMCPU(llvm::sys::getHostCPUName()); engineBuilder.setEngineKind(llvm::EngineKind::JIT); engineBuilder.setOptLevel(llv...
2016 Sep 14
2
setDataLayout segfault
...copy later on. It is confusing to require a unique_ptr. Frank On 09/14/2016 12:11 PM, Frank Winter via llvm-dev wrote: > I am constructing the engine builder in the following way: > > llvm::SMDiagnostic Err; > unique_ptr<Module> Mod = getLazyIRFileModule("f.ll", Err, TheContext); > llvm::EngineBuilder engineBuilder(std::move(Mod)); > > However, after moving the pointer to the constructor it is no longer > retrievable from the unique_ptr object. > > Mod.get()->dump(); // this segfaults after the move, but not before > > So I conclude that any...
2006 Nov 03
1
In bound SIP context issue
...eive an inbound SIP connection and send it to a specified context. Instead of sending the call the specified context, asterisk is using the context default from [general]? Any thoughts? I am sure that it is something simple I am missing. To recap, it is sending calls to the context default, not thecontext... [general] context=default srvlookup=yes [username1] type=peer username=username1 secret=test1234 host=dynamic dtmfmode=rfc2833 context=thecontext nat=no deny=0.0.0.0/0.0.0.0 permit=XXX.XXX.XXX.XXX/255.255.255.255 permit=XXX.XXX.XXX.XXX/255.255.255.255 permit=XXX.XXX.XXX.XXX/255.255.255.255 per...
2018 Jul 20
2
LLVM FunctionType cannot be returned as VectorType?
...de. In particular, I am dealing with AVX2 SIMD API which uses __m256i. My function input types a set of vectors and return type is also a vector. /////////////////////////////////////////////////////////////////////////////////////////// arguments.push_back(VectorType::get(IntegerType::getIntNTy(TheContext, 64), 4));//int64*4 = __m256i FunctionType * proto = FunctionType::get(VectorType::get(IntegerType::getIntNTy(TheContext, 64), 4),//int64*4 = __m256i arguments, false); /////////////////////////////////////////////////////////...
2018 Jul 23
2
LLVM FunctionType cannot be returned as VectorType?
...be all 0. Can you please help me figure out what's going on here? Any help will be greatly appreciated. /////////////////////////////////////////////////////////////////////////////////////////// My function prototype definition: auto vectorDataType = VectorType::get(IntegerType::getIntNTy(TheContext, 64), 4); std::vector<Type *> vecArguments; for (Uint64 nodeId = startOfLeaves; nodeId < numNodes; ++nodeId) { vecArguments.push_back(vectorDataType); } proto = FunctionType::get(vectorD...
2009 Sep 11
0
[LLVMdev] [proposal] Extensible IR metadata
...more convenient access to it. It would be more convenient for users if instead of MDNode *DbgInfo = Inst->getMD(MDKind::DbgTag); Inst2->setMD(MDKind::DbgTag, DbgInfo); they could write: DILocation DbgInfo = Inst->getMD<DILocation>(); inst2->setMD(DbgInfo); we'd use TheContext->RegisterMDKind<MyKindWrapper>() or ...Register<MyKindWrapper>("name"); to register a new kind. (I prefer the first.) These kind wrappers need a couple methods to make them work: const StringRef KindWrapper::name("..."); KindWrapper(MDNode*); // Except for spec...
2018 Jul 23
2
LLVM FunctionType cannot be returned as VectorType?
...going on here? Any help will be > greatly appreciated. > > > /////////////////////////////////////////////////////////////////////////////////////////// > > > > My function prototype definition: > > > > auto vectorDataType = VectorType::get(IntegerType::getIntNTy(TheContext, > 64), 4); > > std::vector<Type *> vecArguments; > > for (Uint64 nodeId = startOfLeaves; nodeId < numNodes; > ++nodeId) { > > vecArguments.push_back(vectorDataType); > > } &gt...
2017 Feb 06
3
Kaleidoscope tutorial: comments, corrections and Windows support
Hi, I'm currently working my way through the tutorial with LLVM 3.9.1 on Windows (finished chapter 4) and stumbled over a few things which could be improved: - "LLVMContext" does not exist as a variable -> "TheContext" - Chapter 3: 5 times - Chapter 4: 1 time - Chapter 5: 4 times - Chapter 6: 2 times - Chapter 7: 2 times 3.4. Function Code Generation - Wouldn't it make sense to have a "Type *DoubleTy = Type::getDoubleTy(TheContext);"? - "Function *TheFunction...
2009 Sep 11
12
[LLVMdev] [proposal] Extensible IR metadata
Devang's work on debug info prompted this, thoughts welcome: http://nondot.org/sabre/LLVMNotes/ExtensibleMetadata.txt -Chris
2017 Jun 09
2
Subclassing LLVM Type
...which is my own class ) I explored this a bit and did manage to create one. ========== DummyType class ========= class DummyType : public llvm::Type { private: std::string typeIdentifier; public: DummyType(const std::string& typeIdentifier,TypeID tyId):typeIdentifier(typeIdentifier),Type(TheContext,tyId) { } std::string getTypeIdentifierString() const { return this->typeIdentifier ; } }; ============================================ Now , Type* ty = new DummyType() works. However , I wish to use "dynamic_cast<>" at runtime but I'm unable to do so. example - Dum...
2017 May 29
2
Print 128 bit value at runtime using printf
...s,"; } } tempString = tempString + "%+d,"; } // if any of the 6 floating point types else if(val->getType()->isFloatingPointTy()) { tempString = tempString + "%+f,"; //Apparently this is needed by printf,otehrwise prints 0.000 val = convertType(val,Type::getDoubleTy(TheContext)); } argsValueVector.push_back(val); ++i; } formatString = formatString + tempString + "\n" ; // For something like printf , insert a format string at the beginning. if( F->isVarArg() ) { // every string is declared as a "global constant" at the top of the module. Value*...
2009 Sep 11
4
[LLVMdev] [proposal] Extensible IR metadata
...enient for > users if instead of > > MDNode *DbgInfo = Inst->getMD(MDKind::DbgTag); > Inst2->setMD(MDKind::DbgTag, DbgInfo); > > they could write: > > DILocation DbgInfo = Inst->getMD<DILocation>(); > inst2->setMD(DbgInfo); > > we'd use TheContext->RegisterMDKind<MyKindWrapper>() or > ...Register<MyKindWrapper>("name"); to register a new kind. (I prefer > the first.) Yes, this is very convenient. This along with the rest of Chris' proposal is very similar to the way we handled metadata in a compiler I wor...