Displaying 9 results from an estimated 9 matches for "commonlinkage".
2015 Jul 24
3
[LLVMdev] LLVM linkage flags
....
>
> AppendingLinkage: Special purpose, only applies to global arrays.
>
> InternalLinkage: Rename collisions when linking (static functions).
>
> PrivateLinkage: Like Internal, but omit from symbol table.
>
> ExternalWeakLinkage: ExternalWeak linkage description.
>
> CommonLinkage: Tentative definitions.
>
When I have source code like:
int x = 0;
int main(){...}
I end up with an ExternalLinkage flag on x. Why would this not have
CommonLinkage? When I have the same code as above and don't initialize x,
I end up with the CommonLinkage flag.
Any insight would be appr...
2019 Feb 22
2
Create the GlobalVariable which have extern in one header file
...a header file to use it in the following way
extern const void* DATA_TABLE[];
And with a LLVM PASS, I am trying to create this array with the same name and with initializer. So, I have following:
GlobalVariable *gvar_data = new GlobalVariable(
M, blockItems->getType(), true, GlobalValue::CommonLinkage,
blockItems, "DATA_TABLE");
gvar_data->setAlignment(16);
gvar_data->setSection("data_section");
gvar_data->addAttribute(llvm::Attribute::OptimizeNone);
I am not sure if I am using the correct Linkage or not.
The pass has failed to complete it. Here is the runtime f...
2019 May 12
2
Why does verifyFunction dislike this?
...char **argv) {
LLVMContext context;
IRBuilder<> builder(context);
Module module("", context);
// Function
auto rty = Type::getInt32Ty(context);
SmallVector<Type *, 1> pty;
auto ty = FunctionType::get(rty, pty, false);
auto f = Function::Create(ty, GlobalValue::CommonLinkage, "f", module);
// Entry block
auto entry = BasicBlock::Create(context, "entry", f);
builder.SetInsertPoint(entry);
// return 0
auto val = ConstantInt::getSigned(rty, 0);
builder.CreateRet(val);
// Check
f->dump();
outs() << verifyFunction(*f) <&l...
2015 Jul 14
3
[LLVMdev] RFC: ThinLTO Symbol Linkage and Renaming
...the end) may not come through
in the copied text below well.
Thanks!
Teresa
ThinLTO Symbol Linkage and Renaming
1 Introduction
2 Non-Discardable Values
2.2 Linkage Effects
2.2.2 ExternalLinkage
2.2.1 WeakAnyLinkage
2.2.2 WeakODRLinkage
2.2.3 AppendingLinkage
2.2.4 CommonLinkage
3 Linkonce Values
3.1 Linkage Effects
3.2 Importing Strategy
4 Static Values
4.1 Static Variables
4.2 Static Functions
4.3 Static Promotion
4.3.1 Linkage Effects
4.3.2 Renaming
5 Linkage Change Summary Table
1 Introduction
This document describes handling of symbols th...
2018 May 16
0
Global is external, but doesn't have external or weak linkage!
...lVariable, when I ran it get the
following error:
Global is external, but doesn't have external or weak linkage!
i8** @myvar
This is how I create the GlobalVariable:
------------------------------------------------
new llvm::GlobalVariable(*M, IRB.getInt8PtrTy(), false,
llvm::GlobalValue::CommonLinkage,
nullptr, "myvar", NULL,
GlobalVariable::GeneralDynamicTLSModel,
0, false);
------------------------------------------------
I am using "IRB.getInt8PtrTy()" because this variable will be a pointer to
a buffer "char *".
This used to work with Clang 4.0, I hav...
2019 Feb 22
1
Create the GlobalVariable which have extern in one header file
...imizeNone);
On Feb 22 2019, at 12:02 am, Tim Northover <t.p.northover at gmail.com> wrote:
On Thu, 21 Feb 2019 at 18:42, Mustakimur Khandaker via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
GlobalVariable *gvar_data = new GlobalVariable(
M, blockItems->getType(), true, GlobalValue::CommonLinkage,
blockItems, "DATA_TABLE");
gvar_data->setAlignment(16);
gvar_data->setSection("data_section");
gvar_data->addAttribute(llvm::Attribute::OptimizeNone);
I am not sure if I am using the correct Linkage or not.
The pass has failed to complete it. Here is the runtime fault...
2015 Jul 21
1
[LLVMdev] RFC: ThinLTO Symbol Linkage and Renaming
...age and Renaming
> >
> >
> > 1 Introduction
> > 2 Non-Discardable Values
> > 2.2 Linkage Effects
> > 2.2.2 ExternalLinkage
> > 2.2.1 WeakAnyLinkage
> > 2.2.2 WeakODRLinkage
> > 2.2.3 AppendingLinkage
> > 2.2.4 CommonLinkage
> > 3 Linkonce Values
> > 3.1 Linkage Effects
> > 3.2 Importing Strategy
> > 4 Static Values
> > 4.1 Static Variables
> > 4.2 Static Functions
> > 4.3 Static Promotion
> > 4.3.1 Linkage Effects
> > 4.3.2 Renaming
> &g...
2015 Jul 21
2
[LLVMdev] RFC: ThinLTO Symbol Linkage and Renaming
...gt; 4.3.1. In all other cases the linkage in the original module stays the
> same, and therefore is not noted in the table below.
> >
> > Note that there are no InternalLinkage, PrivateLinkage,
> AvailableExternallyLinkage, LinkOnce*Linkage, Weak*Linkage,
> AppendingLinkage and CommonLinkage declarations. There are no
> ExternalWeakLinkage definitions.
> >
> >
> +---------------------------------+------------------------------------------------+
> > | | Importing Module Linkage
> |
> > | Original Modul...
2019 Jan 19
3
Can't find symbol from llvm backend
No, I don't. But I’m sure it is not optimized because I can see this
variable in the final binary file emitted.
Do you mean if I don’t refer to this variable in the front end, then I
can’t see it in the backend? (although it’s in the final binary file)
Thank you!
2019年1月19日(土) 2:00 <paul.robinson at sony.com>:
> Do you have a use of the new variable as well? If not, it might be