[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


http://llvm.org/bugs/show_bug.cgi?id=1719

           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


a.c:
 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"
bad
$ opt -internalize -inline a.o |llvm-dis -o - |grep func >/dev/null && echo
"good" || echo "bad"
good
$ opt -internalize -constmerge -inline a.o |llvm-dis -o - |grep func >/dev/null
&& echo "good" || echo "bad"
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