Displaying 11 results from an estimated 11 matches for "fmerg".
Did you mean:
emerg
2020 Sep 16
2
[ELF] String literals don't obey -fdata-sections
...the bug was known and
voluntary not fixed by laziness ;-). I am sure there is a valid reason
and wanted to know about it. Just like you explained, it appears that
LLVM rely on LLD to do that instead of enforcing it in the middle-end
which is a different approach to GCC.
> In GCC, -O turns on -fmerge-constants. Clang does not implement this
> option, but implement the level 2 -fmerge-all-constants, which is non-conforming ("Languages like C or C++
> require each variable, including multiple instances of the same variable
> in recursive calls, to have distinct locations, so using...
2020 Sep 15
2
[ELF] String literals don't obey -fdata-sections
Hi there,
When I compile my code with -fdata-sections and -ffunction-sections, I
still see some unused string in my shared library (Android). Actually,
the strings appear together inside a .rodata.str1.1 section instead of
getting their own section. It seems that the C-string literal are
considered differently than other constant and the -fdata-sections is
not respected in
2008 Oct 16
0
[LLVMdev] merging globals
...t think this is very
> difficult.
Actually, we do this on purpose. It is a huge win for us and we don't
want to not do this, even if that means not exactly conforming to the
standard.
Essentially, we wish the standard had chosen otherwise. gcc handles
this choice like this:
@item -fmerge-all-constants
Attempt to merge identical constants and identical variables.
This option implies @option{-fmerge-constants}. In addition to
@option{-fmerge-constants} this considers e.g.@: even constant
initialized
arrays or initialized constant variables with integral or floating point
types....
2008 Oct 16
1
[LLVMdev] merging globals
On Oct 15, 2008, at 7:34 PM, Eli Friedman wrote:
> This bug actually manifests itself in two places: one is
> ConstantMerge, the other is the AsmPrinter. It's non-trivial to fix
> because it's really a design bug: we assume that constant==mergeable,
> which simply isn't true. There are a few different ways of fixing
> this; however, I think the only real option is to
2008 Oct 16
2
[LLVMdev] LLVM 2.4 problem? (resend)
On Wed, Oct 15, 2008 at 8:28 AM, Chris Lattner <clattner at apple.com> wrote:
>> I do think however that it's bit dangerous to combine static constants
>> across compilation units.
>
> GCC does the same things with strings in some cases. You shouldn't
> depend on this behavior if you want portable code.
Combining is explicitly allowed for strings in C:
2008 Oct 17
1
[LLVMdev] merging globals
On Thu, Oct 16, 2008 at 3:26 PM, Mike Stump <mrs at apple.com> wrote:
> On Oct 16, 2008, at 1:57 PM, Eli Friedman wrote:
>> I strongly doubt we can get away with that.
>
> Yeah, we agree on that one. I was just thinking about the const case.
>
>> Here's a more concrete version of the solution I'm proposing: we add a
>> new optional marking to constant
2008 Oct 17
3
[LLVMdev] merging globals
Hello, Tatu
> Is that correct? I think it's just something to be aware of.
Currently we're aggressively merging globals by default. Do you think it
will be better to provide special flag to control this behavior?
--
WBR, Anton Korobeynikov
2018 Apr 02
1
const struct auto vs. static
I find it surprising that given this:
void f1()
{
const struct { int a; } b = { 0 };
}
that clang does not put b on the stack.
gcc does. My gut feeling says it belongs on stack.
But perhaps, the thing is, it is const, and location
shouldn't matter to most code, as long as lifetime is adequate.
Almost no code could tell the difference.
But we have code that takes the address of things, and
2015 Jun 05
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
On Thu, Jun 4, 2015 at 5:33 PM, Reid Kleckner <rnk at google.com> wrote:
> On Thu, Jun 4, 2015 at 5:17 PM, Teresa Johnson <tejohnson at google.com> wrote:
>>
>> Agreed. Although I assume you mean invoke the new pass under a
>> ThinLTO-only option so that avail extern are not dropped in the
>> compile pass before the LTO link?
>
>
> No, this pass
2015 Jun 04
5
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
On Thu, Jun 4, 2015 at 3:58 PM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:
>
> > Personally, I think the right approach is to add a bool to
> createGlobalDCEPass defaulting to true named something like
> IsAfterInlining. In most standard pass pipelines, GlobalDCE runs after
> inlining for obvious reasons, so the default makes sense. The special case
> is
2015 Jun 08
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...able less precise MAD instructions to
///< be generated.
+CODEGENOPT(LTO , 1, 0) ///< Set when -flto is enabled.
CODEGENOPT(MergeAllConstants , 1, 1) ///< Merge identical constants.
CODEGENOPT(MergeFunctions , 1, 0) ///< Set when -fmerge-functions is enabled.
CODEGENOPT(MSVolatile , 1, 0) ///< Set when /volatile:ms is enabled.
Index: lib/CodeGen/BackendUtil.cpp
===================================================================
--- lib/CodeGen/BackendUtil.cpp (revision 237590)
+++ lib/CodeGen/BackendUtil.cpp (working co...