Displaying 7 results from an estimated 7 matches for "hassection".
Did you mean:
assertion
2011 Mar 18
2
[LLVMdev] Text or Data symbol
...For my DSP backend, at the lowering stage and also at the AsmPrinter stage,
I need to know if a GlobalAddress is a code or a data address.
So I tried at the lowering stage to use:
GlobalAddressSDNode *GSDN = cast<GlobalAddressSDNode>(Op);
const GlobalValue *GV = GSDN->getGlobal();
GV->hasSection() and GV->getSection()
But the section is not set at this stage (hasSection = false)
And at the AsmPrinter stage:
const GlobalValue *GV = MO.getGlobal();
SectionKind sectionKind = Mang->getSymbol(GV)->getSection().getKind();
But again the section does not seem to be set (sectionKind.isI...
2011 Mar 21
0
[LLVMdev] Text or Data symbol
...owering stage and also at the AsmPrinter stage,
> I need to know if a GlobalAddress is a code or a data address.
>
> So I tried at the lowering stage to use:
> GlobalAddressSDNode *GSDN = cast<GlobalAddressSDNode>(Op);
> const GlobalValue *GV = GSDN->getGlobal();
> GV->hasSection() and GV->getSection()
> But the section is not set at this stage (hasSection = false)
>
> And at the AsmPrinter stage:
> const GlobalValue *GV = MO.getGlobal();
> SectionKind sectionKind = Mang->getSymbol(GV)->getSection().getKind();
> But again the section does not se...
2011 Mar 21
1
[LLVMdev] Text or Data symbol
...> AsmPrinter stage, I need to know if a GlobalAddress is a code or a
> data address.
>
> So I tried at the lowering stage to use:
> GlobalAddressSDNode *GSDN = cast<GlobalAddressSDNode>(Op);
> const GlobalValue *GV = GSDN->getGlobal();
> GV->hasSection() and GV->getSection()
> But the section is not set at this stage (hasSection = false)
>
> And at the AsmPrinter stage:
> const GlobalValue *GV = MO.getGlobal();
> SectionKind sectionKind = Mang->getSymbol(GV)->getSection().getKind();
> But again the...
2009 Jul 20
2
[LLVMdev] PIC16TargetAsmInfo::getBSSSectionForGlobal
Hi Sanjiv,
The PIC16TargetAsmInfo::getBSSSectionForGlobal apparently does magic
that reinterprets the "section" field of a global in a strange way:
// If GV has a sectin name or section address create that section
now.
if (GV->hasSection()) {
std::string SectName = GV->getSection();
// If address for a variable is specified, get the address and
create
// section.
std::string AddrStr = "Address=";
if (SectName.compare(0, AddrStr.length(), AddrStr) == 0) {
std::string SectAddr = SectName...
2009 Jul 20
0
[LLVMdev] PIC16TargetAsmInfo::getBSSSectionForGlobal
...>
>
> Hi Sanjiv,
>
> The PIC16TargetAsmInfo::getBSSSectionForGlobal apparently does magic
> that reinterprets the "section" field of a global in a strange way:
>
> // If GV has a sectin name or section address create that section
> now.
> if (GV->hasSection()) {
> std::string SectName = GV->getSection();
> // If address for a variable is specified, get the address and
> create
> // section.
> std::string AddrStr = "Address=";
> if (SectName.compare(0, AddrStr.length(), AddrStr) == 0) {
>...
2014 Mar 12
3
[LLVMdev] [ARM] [PIC] optimizing the loading of hidden global variable
Hi,
When Im compiling a code with fvisibility=hidden fPIC for ARM, I find
that LLVM generates less optimized code than GCC.
For example:
test.cpp:
void init(void *);
int g0[100];
int g1[100];
int g2[100];
void foo() {
init(&g0);
init(&g1);
init(&g2);
}
Clang will emit 1 GOT entry for each GV and 2 instructions to get the
address:
ldr
2009 Jul 20
2
[LLVMdev] PIC16TargetAsmInfo::getBSSSectionForGlobal
...iv,
>>
>> The PIC16TargetAsmInfo::getBSSSectionForGlobal apparently does magic
>> that reinterprets the "section" field of a global in a strange way:
>>
>> // If GV has a sectin name or section address create that section
>> now.
>> if (GV->hasSection()) {
>> std::string SectName = GV->getSection();
>> // If address for a variable is specified, get the address and
>> create
>> // section.
>> std::string AddrStr = "Address=";
>> if (SectName.compare(0, AddrStr.length(), AddrStr)...