[LLVMbugs] [Bug 1719] New: noinline attribute gets dce'd before -inline

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Oct 1 19:47:13 PDT 2007


           Summary: noinline attribute gets dce'd before -inline
           Product: libraries
           Version: 2.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Transformation Utilities
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: patil.nikhil at gmail.com
                CC: llvmbugs at cs.uiuc.edu

 void func() __attribute__((noinline));
 void func() { }
 int main() { func(); }

$ llvm-gcc -O3 a.c -c -emit-llvm; llvm-ld a.o
$ llvm-dis a.out.bc -o - |grep func >/dev/null && echo "good" || echo "bad"
$ opt -internalize -inline a.o |llvm-dis -o - |grep func >/dev/null && echo
"good" || echo "bad"
$ opt -internalize -constmerge -inline a.o |llvm-dis -o - |grep func >/dev/null
&& echo "good" || echo "bad"

One way to fix this is to disallow internalization of @llvm.noinline (treat it
like "llvm.used").

Also doesn't this issue extend to a lot of other attributes, especially the new
annotate("") attributes?

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list