void (Bill Wendling)
Mind Taker

Projects

User does not belong to any projects.

User Details

User Since
Dec 3 2012, 10:22 AM (303 w, 17 h)

Sent here from the planet Zvddw, Bill's mission is to conquer the world by staying at home and occasionally (read: always) playing poker.

In his spare time, he works on LLVM-related things.

Recent Activity

Tue, Aug 28

void added a comment to D4276: Added llvm.is.constant intrinsic.

What's the status of this patch? I'm running into a situation where evaluating __builtin_constant_p through inlining may be useful.

Tue, Aug 28, 2:34 AM · deleted

Aug 16 2018

void abandoned D50803: [gold-plugin] Add "obj-files" option.

Okay. I was able to hack something together. Thanks!

Aug 16 2018, 3:20 PM
void reclaimed D50803: [gold-plugin] Add "obj-files" option.

I may have spoken too soon. obj_path requires a path to the filename you want to use. This is okay, but when used in a Makefile it becomes difficult:

Aug 16 2018, 11:25 AM
void abandoned D50803: [gold-plugin] Add "obj-files" option.
Aug 16 2018, 11:16 AM
void added a comment to D50803: [gold-plugin] Add "obj-files" option.

Okay. That seems to work. Thanks!

Aug 16 2018, 11:15 AM

Aug 15 2018

void added a comment to D50803: [gold-plugin] Add "obj-files" option.
In D50803#1201353, @pcc wrote:

Doesn't the obj-path option already do what you want here?

Aug 15 2018, 2:08 PM
void created D50803: [gold-plugin] Add "obj-files" option.
Aug 15 2018, 1:23 PM

Jul 12 2018

void committed rL336943: [gold-plugin] Disable section ordering for relocatable links.
[gold-plugin] Disable section ordering for relocatable links
Jul 12 2018, 1:41 PM
This revision was not accepted when it landed; it landed in state Needs Review.
Jul 12 2018, 1:41 PM
void updated the diff for D48756: [gold-plugin] Disable section ordering for relocatable links.
Jul 12 2018, 1:36 PM
void retitled D48756: [gold-plugin] Disable section ordering for relocatable links from [gold-plugin] Add option for section ordering to [gold-plugin] Disable section ordering for relocatable links.
Jul 12 2018, 1:35 PM
void updated the diff for D48756: [gold-plugin] Disable section ordering for relocatable links.

Is this the change you were thinking of?

Jul 12 2018, 12:17 PM

Jul 11 2018

void added a comment to D48756: [gold-plugin] Disable section ordering for relocatable links.
In D48756#1159410, @pcc wrote:
In D48756#1159339, @pcc wrote:

I want to help you get this fixed, so I had one idea about what the root cause might be. Normally the linker will strip the name of the function from the output section when -function-sections is enabled, so .text.foo becomes .text in the output file. What that means is that without any special flags, -function-sections shouldn't normally change the output in any observable way. One case in which it is observable is when creating a relocatable object file with the -r flag. I happen to know that Linux kernel modules (.ko files) are represented as relocatable object files, so my suspicion is that the Linux kernel loader doesn't like section names of the form .text.foo in .ko files. If that's the case, a better fix would be to disable function sections only when creating a relocatable object file. That seems fine to me because relocatable files cannot usually be optimized by the linker. (What it probably also means is that in a later change we will want to save the -ffunction-sections and -fdata-sections flags passed at compile time and use them at link time. That would make things more complicated if we had just added a flag, because now we need to decide what to do if the link-time flag conflicts with the compile-time flag.) You can check whether -r was passed by checking whether the LDPT_LINKER_OUTPUT tag passed to the plugin is LDPO_REL.

The -r flag is being used, so your analysis is probably correct. From looking at the code, the kernel turns on function/data sections only when the CONFIG_SPLIT_SECTIONS option is set. The issue with disabling function sections for .ko files is that the gold linker doesn't know that they're turned off for those files. That information is lost because the command line information is lost.

It's certainly lost at compile time right now. Putting no-function-sections behind -r isn't as good as using the compile-time flags, but it seems like it would make things more likely to work in cases where the consumer of the output file cares about section names, so it seems like it would do until the flag gets hooked up properly.

Also, I believe I was seeing these function sections in non-.ko files (after the final link).

Can you double check which kind of files they were? It's possible that they were non-.ko relocatable files that might have been used to create the final image.

Jul 11 2018, 5:07 PM
void added a comment to D48756: [gold-plugin] Disable section ordering for relocatable links.
In D48756#1159339, @pcc wrote:

I think it's important to understand exactly how the Linux kernel is sensitive to being linked, so that once we understand the root cause, we can develop an appropriate fix. It may be that the root cause is a deliberate dependency on an implementation detail, but that doesn't necessarily mean that the right fix is to add a flag, it could mean that we can develop a more targeted fix that doesn't require a flag. Or it could just be a bug, in which case we can fix it uncontroversially without needing to add a flag. In general I think it's important to find a solution that avoids adding flags because that increases the maintenance burden of the program. Here's an excellent article I recently read that makes the point better than I can: http://neugierig.org/software/blog/2018/07/options.html

Jul 11 2018, 4:12 PM
void committed rL336858: Temporarily reverting..
Temporarily reverting.
Jul 11 2018, 2:53 PM
void committed rL336838: gold: Add ability to toggle function/data sections.
gold: Add ability to toggle function/data sections
Jul 11 2018, 12:18 PM

Jul 7 2018

void updated the diff for D48756: [gold-plugin] Disable section ordering for relocatable links.
Jul 7 2018, 4:26 PM
void added a comment to D48756: [gold-plugin] Disable section ordering for relocatable links.
In D48756#1149891, @pcc wrote:

Though frankly if the user doesn't specify --segment-ordering-file, then I'm not sure why the default is for this to be true.

Because -function-sections and -data-sections allow for code size optimizations, specifically --gc-sections and --icf.

Then it should be dependent upon those options and not set true for every run. Note that given linkers don't normally create new sections for each function, running LTO on the program unexpectedly changes the resulting output. This isn't good, despite the fact that 99.99% of people may not notice a difference.

Jul 7 2018, 4:19 PM

Jul 1 2018

void updated the diff for D48756: [gold-plugin] Disable section ordering for relocatable links.

I changed it so that the original behavior is not changed. You need to specify disable-section-ordering as a plugin option.

Jul 1 2018, 2:10 AM

Jun 29 2018

void added a comment to D48756: [gold-plugin] Disable section ordering for relocatable links.

Can I explain why it doesn't boot? No. At least not the root cause of why it won't boot. That's just the behavior we see. As I mentioned, Linux is very sensitive to what the linker is doing. E.g., we can't use the gold linker in the final binary link phase. If you wish, I can change the default here. Though frankly if the user doesn't specify --segment-ordering-file, then I'm not sure why the default is for this to be true.

Jun 29 2018, 1:07 PM
void created D48756: [gold-plugin] Disable section ordering for relocatable links.
Jun 29 2018, 1:07 AM

Jun 12 2018

void committed rL334573: Remove extraneous semicolon..
Remove extraneous semicolon.
Jun 12 2018, 11:38 PM
void committed rC334573: Remove extraneous semicolon..
Remove extraneous semicolon.
Jun 12 2018, 11:38 PM
void committed rL334571: Set the code model when specified..
Set the code model when specified.
Jun 12 2018, 11:00 PM

Jun 4 2018

void added inline comments to D47545: [MC][X86] Allow assembler variable assignment to register name..
Jun 4 2018, 1:43 PM
void added inline comments to D47545: [MC][X86] Allow assembler variable assignment to register name..
Jun 4 2018, 11:03 AM

Jun 3 2018

void added a comment to D4276: Added llvm.is.constant intrinsic.

Friendly ping. :-)

Jun 3 2018, 10:44 PM · deleted

May 30 2018

void added inline comments to D47545: [MC][X86] Allow assembler variable assignment to register name..
May 30 2018, 3:19 PM

May 13 2018

void closed D46802: The return value of a comparison operator is -1 if true and 0 if false.
May 13 2018, 10:29 PM
void committed rL332215: Correct compatibility with the GNU Assembler's handling of comparison ops.
Correct compatibility with the GNU Assembler's handling of comparison ops
May 13 2018, 10:29 PM
void updated the diff for D46802: The return value of a comparison operator is -1 if true and 0 if false.

Fix logical operators. They return 1 or 0, not -1 or 0.

May 13 2018, 5:23 PM
void added inline comments to D46802: The return value of a comparison operator is -1 if true and 0 if false.
May 13 2018, 5:23 PM
void updated the diff for D46802: The return value of a comparison operator is -1 if true and 0 if false.

Add fix for MIPS test.

May 13 2018, 2:22 AM
void created D46802: The return value of a comparison operator is -1 if true and 0 if false.
May 13 2018, 1:13 AM

Apr 19 2018

void added a comment to D4276: Added llvm.is.constant intrinsic.

I have no more concerns with this patch.

Apr 19 2018, 6:36 PM · deleted

Apr 18 2018

void added a comment to D4276: Added llvm.is.constant intrinsic.

Friendly ping? :-)

Apr 18 2018, 11:33 AM · deleted

Apr 17 2018

void removed a reviewer for D45454: Add llvm_gcov_flush to be called outside a shared library: void.
Apr 17 2018, 2:34 PM
void removed a reviewer for D5154: Fix PR20800: correctly calculate the offset of the subq instruction when generating compact unwind info.: void.
Apr 17 2018, 2:34 PM
void removed a reviewer for D390: add __attribute__ no_uninitialized_checks. Map no_uninitialized_checks/no_thread_safety_analysis to LLVM function attributes.: void.
Apr 17 2018, 2:33 PM
void removed a reviewer for D15774: [PEI] Calculate stack protector frame offset before local stack allocation.: void.
Apr 17 2018, 2:24 PM
void removed a reviewer for D10301: Fix Linker instruction rewrites for modules with identical types: void.
Apr 17 2018, 2:23 PM

Apr 15 2018

void added inline comments to D4276: Added llvm.is.constant intrinsic.
Apr 15 2018, 3:11 AM · deleted

Apr 13 2018

void added inline comments to D4276: Added llvm.is.constant intrinsic.
Apr 13 2018, 4:25 PM · deleted
void added inline comments to D4276: Added llvm.is.constant intrinsic.
Apr 13 2018, 2:29 PM · deleted

Apr 6 2018

void added a comment to D38479: Make -mgeneral-regs-only more like GCC's.

Hallo! I was wondering what the status of this patch was. :-)

Apr 6 2018, 10:58 AM

Sep 8 2016

void accepted D21514: Rationalise the attribute getter/setter methods on Function and CallSite..

LGTM

Sep 8 2016, 7:09 PM

Sep 25 2015

void added a comment to D13142: [PowerPC] Replace cntlz[.] with cntlzw[.].

Unfortunately, I only vaguely recall this patch. Is there a reason not to
have support for both? I don't think we support POWER in LLVM though (I
could be wrong there) ... You may need to ask one of the ppc experts here.

Sep 25 2015, 4:55 PM

Jan 14 2015

void committed rL226082: Creating release_36 branch off revision 225991.
Creating release_36 branch off revision 225991
Jan 14 2015, 6:38 PM

Jul 10 2014

void accepted D4256: Fix for crash during SjLj preparation step.
Jul 10 2014, 12:31 AM

Jul 9 2014

void added inline comments to D4256: Fix for crash during SjLj preparation step.
Jul 9 2014, 10:43 PM
void added a comment to D4256: Fix for crash during SjLj preparation step.

I think there's some misunderstanding of what I'd like to see here. (I confused things by using 'null' for the example.) This is the type of code I was thinking of:

Jul 9 2014, 3:52 PM
void added inline comments to D4256: Fix for crash during SjLj preparation step.
Jul 9 2014, 3:44 PM
void added a comment to D4256: Fix for crash during SjLj preparation step.
In D4256#10, @vhbit wrote:

Still need advice if it is possible to unify both aggregate type branches into one, as I'm not sure if there is a combination of codegen/optimization flags which might not eliminate loading from null.

Jul 9 2014, 12:51 AM

Jul 2 2014

void added a comment to D4256: Fix for crash during SjLj preparation step.

This is crying out for a testcase. Can you supply one?

Jul 2 2014, 12:21 PM