Page MenuHomePhabricator

LevitatingLion (LevitatingLion)
User

Projects

User does not belong to any projects.

User Details

User Since
Nov 15 2019, 3:46 AM (44 w, 2 d)

Recent Activity

Apr 9 2020

LevitatingLion added a comment to D70366: Add new 'flatten' LLVM attribute to fix clang's 'flatten' function attribute.

Maybe we can add an additional string attribute when adding the noinline attribute to functions which are not marked noinline in the source code, something like "noinline-added-by-clang". I don't know if that's a legitimate use case for a string attribute, but it wouldn't be very invasive. What do you think?

Another option (not sure if it's better) would be to add a noopt LLVM attribute that Clang adds for -O0 instead of noinline. Two possibilities would be to update the inliner to pay attention to that as well (with special logic for flatten), or to change the always-inliner to add noinline to anything marked noopt.

noopt == optnone? Both optnone and noinline are set in O0, so we could just not place noinline (I think).

Sure, that could work. Or the noflatten idea is another possibility. It would be good to hear what others think.

Apr 9 2020, 2:10 PM · Restricted Project, Restricted Project

Apr 8 2020

LevitatingLion added a comment to D70366: Add new 'flatten' LLVM attribute to fix clang's 'flatten' function attribute.

While adding tests to clang I realized the attribute is not working as intended when using an optimization level of zero, because clang adds the noinline attribute to all functions. In this case the optimizer cannot distinguish between functions originally marked noinline (where recursive always-inlining should stop) and those where clang added the attribute (where recursive always-inlining should continue).

Apr 8 2020, 2:08 PM · Restricted Project, Restricted Project

Apr 1 2020

LevitatingLion updated the diff for D70366: Add new 'flatten' LLVM attribute to fix clang's 'flatten' function attribute.

I rebased my changes onto 49d00824bbb, renamed the attribute to 'alwaysinline_recursively', and added some more tests. The testcase 'highLevelStructure.3.2.ll' does not fail anymore, all regression tests pass.

Apr 1 2020, 8:47 AM · Restricted Project, Restricted Project

Mar 27 2020

LevitatingLion added a comment to D70366: Add new 'flatten' LLVM attribute to fix clang's 'flatten' function attribute.

Thanks for the ping. I hadn't looked at this since, but I'll update the patch this weekend.

Mar 27 2020, 10:32 PM · Restricted Project, Restricted Project

Nov 29 2019

LevitatingLion added a comment to D70366: Add new 'flatten' LLVM attribute to fix clang's 'flatten' function attribute.

Ping

Nov 29 2019, 5:30 AM · Restricted Project, Restricted Project

Nov 18 2019

LevitatingLion added inline comments to D70366: Add new 'flatten' LLVM attribute to fix clang's 'flatten' function attribute.
Nov 18 2019, 7:34 AM · Restricted Project, Restricted Project

Nov 17 2019

LevitatingLion created D70366: Add new 'flatten' LLVM attribute to fix clang's 'flatten' function attribute.
Nov 17 2019, 4:11 PM · Restricted Project, Restricted Project