search for: getnam

Displaying 20 results from an estimated 714 matches for "getnam".

Did you mean: getname
2012 Jul 05
4
[LLVMdev] Accessing Return Variable Names
Hello, I'm new to llvm development and I have a question which I think should be straight forward, but I am having trouble figuring it out. I want to be able to access the return variable name for an instruction. For some instructions I can get this value through the "getName" method. For example, with the instruction: > %arg11 = bitcast i32* %arg1 to i8*, !dbg !42, !id !43 calling the "getName" method returns: > arg11 However, for the instruction: > %4 = load i32* %arg1, align 4, !dbg !57, !id !59 the "getName" method retur...
2009 Aug 04
3
[LLVMdev] Outputting hex in DOUT's
On Tuesday 04 August 2009 18:24, Chris Lattner wrote: > The big issue is things like this: > > DOUT << foo.getName() << "\n"; > > When -debug is disable and even when assertions are turned off, > foo.getName() is still called. When you use: Yep, that's a problem. > DEBUG(errs() << foo.getName() << "\n"); > > When assertions are turned off, the call...
2011 Sep 22
2
[LLVMdev] How to const char* Value for function argument
...e::ExternalLinkage, "kernelgen_launch_", m2); { CallInst* call = dyn_cast<CallInst>(cast<Value>(I)); if (!call) continue; Function* callee = call->getCalledFunction(); if (!callee && !callee->isDeclaration()) continue; if (callee->getName() != func2.getName()) continue; SmallVector<Value*, 16> callargs(call->op_begin(), call->op_end()); callargs.insert(callargs.begin(), ConstantInt::get(Type::getInt32Ty(context), call->getNumArgOperands())); callargs.insert(callargs.begin(), callee->ge...
2013 Jul 22
0
[LLVMdev] Analysis of polly-detect overhead in oggenc
...tch file did this work with following modifications: >> >> >> First, it keeps most of string information by replacing "<<" with "+" operation. For example, code like this: >> INVALID(CFG, "Non branch instruction terminates BB: " + BB.getName()); >> would be converted into: >> LastFailure = "Non branch instruction terminates BB: " + BB.getName().str(); >> >> >> Second, it simplifies some complex operations like: >> INVALID(AffFunc, >> "Non affine branch...
2013 Jul 21
2
[LLVMdev] Analysis of polly-detect overhead in oggenc
...o. This > patch file did this work with following modifications: > > > First, it keeps most of string information by replacing "<<" with "+" operation. For example, code like this: > INVALID(CFG, "Non branch instruction terminates BB: " + BB.getName()); > would be converted into: > LastFailure = "Non branch instruction terminates BB: " + BB.getName().str(); > > > Second, it simplifies some complex operations like: > INVALID(AffFunc, > "Non affine branch in BB '" <<...
2009 Sep 04
2
[LLVMdev] Error in Hello World Pass
Hi, I am trying to compile the Hello World pass (described at http://llvm.org/docs/WritingAnLLVMPass.html#basiccode) in an LLVM Project and I get an error, 'no match for ‘operator<<’ at line llvm::cerr << "*Hello: *" << F.getName() << "\n"; But when I looked up in the LLVM API Documentation, I think "<<" operator is not overloaded for the StringRef class returned by getName() of the Function class. If I replace the above line with llvm::cerr << "*Hello: *" << F.getNam...
2013 Oct 19
2
[LLVMdev] Name of Virtual Registers
...d nsw i32 %mul17, %37 in this case I want to extract the name of the virutal registers as "add18", "mul17","37". This can easily be done in the case of store Instruction eg. store i32 %add20, i32* %t, align 4 in this case functions like instr->getOperand(0)->getName() and instr->getOperand(1)->getName() will fetch me "add20" and "t" respectively. But I want this for every Instruction, So How can I achieve this?? -- View this message in context: http://llvm.1065342.n5.nabble.com/Name-of-Virtual-Registers-tp62256.html Sent from th...
2012 Jul 05
0
[LLVMdev] Accessing Return Variable Names
Hi John, %4 is not returned, because it's a temp register value and not a named variable. But you can implement something like the code below to get this value. (Not the most elegant, but more or less working solution). static std::string getName(Instruction* i) { if(i->getOpcode() == Instruction::Store) { return getName((dyn_cast<StoreInst>(&*i))->getPointerOperand()); } else if(i->getOpcode() == Instruction::Ret) { return "...
2005 Apr 27
2
Getting the name of an object as character
This could be really trivial, but I cannot find the right function to get the name of an object as a character. Assume we have a function like: getName <- function(obj) Now if we call the function like: getName(blabla) and 'blabla' is not a defined object, I want getName to return "blabla". In other word, if paste("blabla") returns "blabla" I want to define a paste function which returns the same c...
2006 May 19
11
Prototype / Scriptaculous & Dojo
Are these libs compatible ? At the very least I''d like to be able to use Prototype &amp; Dojo ? Thoughts welcome.. Matt _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
2010 Jul 16
2
[LLVMdev] Function::getName in CallGraphSCCPass causes bus error
.../ Pass identification, replacement for typeid Hello() : CallGraphSCCPass(&ID) {} virtual bool runOnSCC(std::vector<CallGraphNode *> &SCC) { CallGraphNode *node = SCC.front(); Function *function = node->getFunction(); StringRef str = function->getName(); return false; } }; And when I run the pass with opt, I get: 0 libLLVM-2.7.dylib 0xe0b33d28 llvm::sys::RWMutexImpl::writer_release() + 424 1 libLLVM-2.7.dylib 0xe0b34607 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 1143 2 libSystem.B.dylib...
2009 Jul 23
0
[LLVMdev] [POTENTIAL API CHANGE] Improving llvm::Value getName()/setName()
Following up on my introduction of the StringRef type, I wanted to clean up the API for getting and setting the name of an llvm::Value. There are a number of problems with the current API: 1. There are too many ...Name methods. 2. getName() returns an std::string, which is expensive. 3. getName() is frequently used to derive new names, which are passed to setName(). Currently this uses std::string concatenation. 4. In a Release-Asserts build, we usually don't name values, but we still end up with the overhead of creating and...
2010 Jul 19
0
[LLVMdev] Function::getName in CallGraphSCCPass causes bus error
...ent for typeid > Hello() : CallGraphSCCPass(&ID) {} > virtual bool runOnSCC(std::vector<CallGraphNode *> &SCC) { > CallGraphNode *node = SCC.front(); > Function *function = node->getFunction(); > StringRef str = function->getName(); maybe function is NULL? This is the case for the "external node". Ciao, Duncan. > return false; > } > }; > > And when I run the pass with opt, I get: > > 0 libLLVM-2.7.dylib 0xe0b33d28 > llvm::sys::RWMutexImpl::writer_release() + 424 &...
2011 Sep 22
0
[LLVMdev] How to const char* Value for function argument
...st be passed at runtime, and so can't use a const char * from compile time. You need to make the string visible in the compiled image, and use that as the argument. A string is an array of 8-bit integers, so you need to create a ConstantArray. Value *v = ConstantArray::get(Context, callee->getName(), /*AddNull=*/true); Cheers, James -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Dmitry N. Mikushin Sent: 22 September 2011 11:06 To: LLVM-Dev Subject: [LLVMdev] How to const char* Value for function argument Hi, I'm...
2010 Mar 26
4
[LLVMdev] Operand, instruction
Can anyone tell how to get the result name or instruction name of all instruction? For example if the instruction is "x=add y,z", here i need "x". Using getName(), i am getting some instructions result name, but llvm produces some instruction like "%0=add i32 tmp, 1", here getName() shows empty string as result name. So please help. John Criswell wrote: > > Nipun Arora wrote: >> Hi, >> >> How can one extract the operan...
2013 Jul 22
2
[LLVMdev] Analysis of polly-detect overhead in oggenc
...work with following modifications: >>> >>> >>> First, it keeps most of string information by replacing "<<" with "+" operation. For example, code like this: >>> INVALID(CFG, "Non branch instruction terminates BB: " + BB.getName()); >>> would be converted into: >>> LastFailure = "Non branch instruction terminates BB: " + BB.getName().str(); >>> >>> >>> Second, it simplifies some complex operations like: >>> INVALID(AffFunc, >>>...
2009 Aug 04
2
[LLVMdev] Outputting hex in DOUT's
On Tuesday 04 August 2009 17:52, Chris Lattner wrote: > I'd prefer for it to be eliminated, but it is currently used widely. > If your patches don't make it substantially worse, I won't have a > problem with them. Bonus points for removing DOUTs though :) Ok, this is good to know. With some of these patches I will have opportunities to remove DOUTS. What's the
2009 Aug 04
0
[LLVMdev] Outputting hex in DOUT's
...roblem with them. Bonus points for removing DOUTs though :) > > Ok, this is good to know. With some of these patches I will have > opportunities to remove DOUTS. Nice! Thanks, > What's the rationale for getting rid of it? The big issue is things like this: DOUT << foo.getName() << "\n"; When -debug is disable and even when assertions are turned off, foo.getName() is still called. When you use: DEBUG(errs() << foo.getName() << "\n"); When assertions are turned off, the call doesn't exist. It is also a lot less "mag...
2011 Apr 25
1
[LLVMdev] Inefficiency in Intrinsic::getName in Function.cpp?
I was looking over Function.cpp and saw that for every call to Intrinsic::getName, the entire intrinsic table (about a thousand references to strings) gets copied over for the initialization of Table. Is there a reason for why this is done, or would it be better for Table to be static, so that this initialization only happens on the first call? Perhaps this is optimized away fo...
2019 Aug 23
2
LLVM-8.0 | Requesting Help : Function->getName() returns empty string
Hello All, I am creating a Module and getting Function pointer as below in some function. Function *fn = module->getFunction(fnName); printf("func Name: %s.\n", fn->getName().str().c_str()); . . return (intptr_t) fn; This prints : "func Name: main." I convert the ptr to int and return it. Later I am receiving this as a Func Handler in other function executeFunction(int funcHandle . .) { . . Function *fn = (Function *) funcHandle; printf("fun...