[PATCH] D70350: [DWARF] Allow cross-CU references of subprogram definitions
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 15 16:26:25 PST 2019
dblaikie added inline comments.
Herald added a subscriber: ormris.
================
Comment at: llvm/test/DebugInfo/X86/lto-cross-cu-call-origin-ref.ll:7-11
+;; volatile int sink;
+;;
+;; __attribute__((noinline)) void bar() { ++sink; }
+;;
+;; void foo() {
----------------
By no means mandatory suggestion - my usual approach here would be:
* use a function call to an optnone function instead of a volatile increment (single call instruction, simple/clear to read in IR, etc)
* add an always_inline (or alwaysinline? I never remember the spelling) attribute on 'foo' so as not to rely on optimizations?
Neither make a huge difference & this is nice and simple as-is, but just some ideas.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70350/new/
https://reviews.llvm.org/D70350
More information about the llvm-commits
mailing list