[LLVMbugs] [Bug 3205] New: always_inline doesn't always
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Dec 12 17:40:25 PST 2008
http://llvm.org/bugs/show_bug.cgi?id=3205
Summary: always_inline doesn't always
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: LLVM Codegen
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: alexr at leftfield.org
CC: llvmbugs at cs.uiuc.edu
ReadSwapShort isn't inlined into myfunc in the below code. Building with:
"llvmc -O3 -S -emit-llvm cmap4.c -clang". Without -clang, it is inlined.
inline __attribute__((always_inline))
unsigned short _OSSwapInt16(unsigned short _data)
{
return ((_data << 8) | (_data >> 8));
}
inline __attribute__((always_inline))
unsigned short ReadSwapShort(unsigned char* data, unsigned int offset)
{
return _OSSwapInt16(*(unsigned short*) &data[offset]);
}
unsigned short myfunc(unsigned char* cmap, unsigned int offset, unsigned short
c)
{
return ReadSwapShort(cmap, offset);
}
--
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