This is an archive of the discontinued LLVM Phabricator instance.

Remove address taken, add optnone
AbandonedPublic

Authored by dblaikie on Sep 21 2018, 10:24 AM.

Details

Reviewers
sebpop
hiraditya
Summary

Address taken function may not always be cold.
optnone functions should not be optimized.

Diff Detail

Repository
rL LLVM

Event Timeline

hiraditya created this revision.Sep 21 2018, 10:24 AM
sebpop accepted this revision.Sep 21 2018, 10:47 AM

lgtm

This revision is now accepted and ready to land.Sep 21 2018, 10:47 AM
dblaikie requested changes to this revision.Sep 24 2018, 7:55 PM
dblaikie added a subscriber: dblaikie.

Test case?

This revision now requires changes to proceed.Sep 24 2018, 7:55 PM

Will add one soon!

Adding test

dblaikie added inline comments.Sep 18 2020, 1:09 PM
test/Transforms/HotColdSplit/split-cold-1.ll
29

I'm guessing if this is marked "noinline" then this test wouldn't fail with the patch not applied? (because it'd be caught by the noinline case a few lines later - producing the same behavior)

With the "noinline" removed, does this test fail without the patch applied?

Herald added a project: Restricted Project. · View Herald TranscriptSep 18 2020, 1:09 PM
aeubanks added inline comments.
test/Transforms/HotColdSplit/split-cold-1.ll
29

This patch shouldn't be necessary, optnone requires noinline:

$ cat /tmp/a.ll
define void @test1() optnone {
  ret void
}
$ bin/opt.exe -verify -disable-output /tmp/a.ll
Attribute 'optnone' requires 'noinline'!
void ()* @test1
C:\src\llvm-project\build\rel\bin\opt.exe: C:/src/tmp/a.ll: error: input module is broken!
dblaikie commandeered this revision.Sep 18 2020, 1:29 PM
dblaikie edited reviewers, added: hiraditya; removed: dblaikie.
dblaikie added inline comments.
test/Transforms/HotColdSplit/split-cold-1.ll
29

Great! Given how old the patch is, I'll just commandeer and abandon it.

This revision is now accepted and ready to land.Sep 18 2020, 1:29 PM
dblaikie abandoned this revision.Sep 18 2020, 1:29 PM