Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] RFC: Mangling Unnamed Global Values"
2008 Nov 24
0
[LLVMdev] RFC: Mangling Unnamed Global Values
Can symbols with external linkage but no name be converted
to have internal linkage? Would that solve the problem?
Dan
On Nov 23, 2008, at 2:15 AM, Bill Wendling wrote:
> Hi all,
>
> Right now the Mangler::getValueName() method will produce something
> like "__unnamed_1_37" for a global value that doesn't have a name.
> This is wrong for Objective-C where CFStrings
2008 Nov 24
2
[LLVMdev] RFC: Mangling Unnamed Global Values
The symbols I'm interested in already have internal linkage (as you
would expect). But because the mangler is in charge of assigning them
names, they never seem to be decorated with the 'L' in front. . . .
-bw
On Mon, Nov 24, 2008 at 10:48 AM, Dan Gohman <gohman at apple.com> wrote:
> Can symbols with external linkage but no name be converted
> to have internal linkage?
2008 Nov 24
2
[LLVMdev] RFC: Mangling Unnamed Global Values
On Nov 24, 2008, at 11:07 AM, Chris Lattner wrote:
>
> On Nov 24, 2008, at 11:01 AM, Bill Wendling wrote:
>
>> The symbols I'm interested in already have internal linkage (as you
>> would expect). But because the mangler is in charge of assigning them
>> names, they never seem to be decorated with the 'L' in front. . . .
>
> If you use
2017 Jun 12
4
How to know the sub-class of a Value class?
As a concrete question, I understand 'Value' class is the parent of many
concrete sub-classes. Let's say I retrieve a Value* value =
store_inst->getValueOperand(). Unless I know what the sub-type is, how can
I further use this object? I tried something like this:
=================================================
Value* value = store_inst->getValueOperand()
2009 Mar 26
0
[LLVMdev] how to get the InvodInst 's Operand Name?
Hi zhangzw,
>> invoke void @__cxa_throw(i8* %7, i8* bitcast
>> (%struct.__fundamental_type_info_pseudo* @_ZTIi to i8*), void (i8*)*
>> null)
>> noreturn to label %invcont unwind label %lpad
>
> >>are you trying to get the name "@_ZTIi" or "@__cxa_throw"?
>
> yes! i want get the name @_ZTi or @__cxa_throw,
> the latter
2012 Jul 09
1
[LLVMdev] Problem with getting a result of an instruction.
Hello,
I'm a newbie in LLVM. Now I'm trying to implement a pass that does some
simple form of dynamic dataflow analysis.
In my dataflow analysis I want to know if a specific variable is
"dependent" on another one. "Dependent" means the following: if we have
three variables in a program - a, b and c and in some places of this
program we have the following
2017 Jun 12
4
How to know the sub-class of a Value class?
On 11 June 2017 at 23:06, Jeremy Lakeman <Jeremy.Lakeman at gmail.com> wrote:
> http://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast-
> templates
>
I understand isa and dyn-cast let you test the type of an object at
run-time by leveraging LLVM's custom implementation of RTTI. However, it
doesn't make much sense to test out for all possible sub-classes to
2008 Nov 24
0
[LLVMdev] RFC: Mangling Unnamed Global Values
On Nov 24, 2008, at 11:01 AM, Bill Wendling wrote:
> The symbols I'm interested in already have internal linkage (as you
> would expect). But because the mangler is in charge of assigning them
> names, they never seem to be decorated with the 'L' in front. . . .
If you use SET_DECL_ASSEMBLER_NAME (something like that) you can
specify the full name for this stuff, including
2018 Mar 09
4
Dump LLVM StoreInst
Hi,
I’m writing a loop-free LLVM pass, my thought is to track if the value inside the loop is changed, so I look up the Instruction StoreInst first and try to get its value in a set. I checked getValueOperand(), getValueName() in the API document but unfortunately they failed the compilation.
if (isa<StoreInst>(I)){
Value* v = I.getOperand(0);
Instruction* op1 =
2018 Mar 10
0
Dump LLVM StoreInst
On Fri, Mar 9, 2018 at 9:18 AM, Zhou Zhizhong via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Hi,
>
> I’m writing a loop-free LLVM pass, my thought is to track if the value inside the loop is changed, so I look up the Instruction StoreInst first and try to get its value in a set. I checked getValueOperand(), getValueName() in the API document but unfortunately they failed the
2005 Jul 03
1
[LLVMdev] How do you determine whether a functionisdefinedexternally to a module ?
I have tried the following :-
if (!M.empty())
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
if ( !I->getIntrinsicID() && I->getEntryBlock().empty())
O << "EXTERN " << Mang->getValueName(I) << " : NEAR" << "\n";
Based upon :-
virtual bool Function::isExternal() const { return
2006 Dec 06
2
[LLVMdev] weak linkage
I am implementing weak linkage support on the ARM backend and I
noticed this code on the X86 and PPC backends:
------------------------------------------------
// If the initializer is a extern weak symbol, remember to emit the weak
// reference!
if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
if (GV->hasExternalWeakLinkage())
ExtWeakSymbols.insert(Mang->getValueName(GV));
2013 Jan 10
2
[LLVMdev] LLVM Instruction*->getOperand() not working properly for ICMP
Hello everyone !
In my pass I inspect the penultimate instruction from every basic block in
runOnFunction(). I am interested in ICMP instructions only.
if(BB->size()>1)
if(last->getPrevNode())
{
previous = last->getPrevNode();
ok=1;
}
I want to get the operands of previous, which is of type Instruction*. Due
tests based on getNumOperands, ICMP has 2 (as
2011 Oct 17
2
[LLVMdev] Variable name from metadata
Hi All,
Can we extract name of variable name from "MDNode" ?
1. Neither temp_MDNode->getName() nor temp_MDNode->getValueName() give me "global_int" which is name of a variable.
2. I tried below ways as well.
DIVariable DV(mdnode1);
Value *v = mdnode1->getOperand(0);//gives add 0x69
3. I have written below code to reach till variable name.
LLVMIname is
2009 Jan 27
4
[LLVMdev] RFC: -fwritable-strings Change
There is a problem with Objective-C code where a null string is placed
in the wrong section. If we have this code:
#include <Foundation/Foundation.h>
void foo() {
NSLog(@"");
}
The null string is defined like this:
.const
.lcomm LC,1,0 ## LC
Causing our linker to go nuts, because it expects anonymous strings to
be in the __cstring section. I came up with the attached
2013 Jan 10
0
[LLVMdev] LLVM Instruction*->getOperand() not working properly for ICMP
Hi,
On 10/01/13 10:56, Alexandru Ionut Diaconescu wrote:
> Hello everyone !
>
> In my pass I inspect the penultimate instruction from every basic block in
> runOnFunction(). I am interested in ICMP instructions only.
>
> |if(BB->size()>1)
> if(last->getPrevNode())
> {
> previous = last->getPrevNode();
> ok=1;
> }
> |
2018 Mar 10
0
Dump LLVM StoreInst
The code you've pasted there is inconsistent in variable names. Your
created an instruction called 'op1' but your print uses 'v1'. What should
be an '->' is just a '-'. You also have a variable in your print called
'op' but that's not declared in your code. Also the result of dyn_cast
should always be checked for null before using the result.
2009 Mar 26
2
[LLVMdev] how to get the InvodInst 's Operand Name?
Hi Duncan,
>>are you trying to get the name "@_ZTIi" or "@__cxa_throw"?
yes! i want get the name @_ZTi or @__cxa_throw,
the latter @__cxa_throw i can get it throw value->getName(), but the
@_ZTi it did n't has name!
zhangzw
thanks
2009/3/26 Duncan Sands <baldrick at free.fr>:
> Hi zhangzw,
>
>> invoke void @__cxa_throw(i8* %7, i8*
2011 Oct 17
0
[LLVMdev] Variable name from metadata
Closing this, found below links to get variable name.
http://groups.google.com/group/llvm-dev/browse_thread/thread/1a239f0d24db2b5c
http://markmail.org/message/fj5qg44vyjsdde7k#query:+page:1+mid:5zhmyncisenomcga+state:results
I could do following, to get the required information.
const CallInst *CI = dyn_cast<CallInst>(Insn);
int numoperands =
2009 Jan 27
0
[LLVMdev] RFC: -fwritable-strings Change
On Jan 26, 2009, at 4:07 PMPST, Bill Wendling wrote:
> There is a problem with Objective-C code where a null string is placed
> in the wrong section. If we have this code:
>
> #include <Foundation/Foundation.h>
> void foo() {
> NSLog(@"");
> }
>
> The null string is defined like this:
>
> .const
> .lcomm LC,1,0 ## LC
>
> Causing our