[PATCH] D70350: [DWARF] Allow cross-CU references of subprogram definitions

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 15 16:35:46 PST 2019


vsk added inline comments.


================
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() { 
----------------
dblaikie wrote:
> 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.
Thanks!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70350/new/

https://reviews.llvm.org/D70350





More information about the llvm-commits mailing list