Aaron Gray
2009-Jul-18 22:28 UTC
[LLVMdev] Where does llvm.memcpy.i64 and friends get lowered ?
2009/7/18 Chris Lattner <clattner at apple.com>> > On Jul 18, 2009, at 2:56 PM, Aaron Gray wrote: > > I am iterating through Modules symbols for 'test/CodeGen/X86/memcpy.bc > > > If you're iterating over functions, just ignore all intrinsics. >Okay, but it would be nice if the Module object reflected the lowered symbol names like 'memcpy' too. It seems a bit of an inconsistancy for the Module not to reference this and have to pick it up from the relocations. Also there is the matter of 'abort' which seems to be defined by most if not all modules even if it is not being used. I am using GlobalValue::getUses() to filter it. Whats going on with 'abort' ? Aaron> > -Chris > > > I get :- > > ---------- Functions ---------- > llvm.memcpy.i64 > Mangled name = llvm.memcpy.i64 > DefaultVisibility > ExternalLinkage - Externally visible. > my_memcpy > Mangled name = my_memcpy > DefaultVisibility > ExternalLinkage - Externally visible. > my_memcpy2 > Mangled name = my_memcpy2 > DefaultVisibility > ExternalLinkage - Externally visible. > abort > Mangled name = abort > DefaultVisibility > ExternalLinkage - Externally visible. > ----------- Globals ----------- > ----------- Aliases ----------- > > I am using this to define my symbols, but the relocations contain 'memcpy'. > > Aaron > > > > 2009/7/18 Eli Friedman <eli.friedman at gmail.com> > >> On Sat, Jul 18, 2009 at 2:21 PM, Aaron >> Gray<aaronngray.lists at googlemail.com> wrote: >> > I am working on the COFF backend and am wondering where llvm.memcpy gets >> > lowered to memcpy ? >> >> It's done by ISel. See SelectionDAG::getMemcpy. >> >> -Eli >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090718/cbfe2d14/attachment.html>
Aaron Gray
2009-Jul-18 22:38 UTC
[LLVMdev] Where does llvm.memcpy.i64 and friends get lowered ?
2009/7/18 Aaron Gray <aaronngray.lists at googlemail.com>> 2009/7/18 Chris Lattner <clattner at apple.com> > >> >> On Jul 18, 2009, at 2:56 PM, Aaron Gray wrote: >> >> I am iterating through Modules symbols for 'test/CodeGen/X86/memcpy.bc >> >> >> If you're iterating over functions, just ignore all intrinsics. >> > > > Okay, but it would be nice if the Module object reflected the lowered > symbol names like 'memcpy' too. It seems a bit of an inconsistancy for the > Module not to reference this and have to pick it up from the relocations. > > Also there is the matter of 'abort' which seems to be defined by most if > not all modules even if it is not being used. I am > using GlobalValue::getUses() to filter it. Whats going on with 'abort' ? >In fact I cannot use getUses() as other "exported" symbols have zero uses. My DiagWriter program is giving me :- ---------- Functions ---------- llvm.memcpy.i64 Mangled name = llvm.memcpy.i64 DefaultVisibility ExternalLinkage - Externally visible. Uses = 2 my_memcpy Mangled name = _my_memcpy DefaultVisibility ExternalLinkage - Externally visible. Uses = 0 my_memcpy2 Mangled name = _my_memcpy2 DefaultVisibility ExternalLinkage - Externally visible. Uses = 0 abort Mangled name = _abort DefaultVisibility ExternalLinkage - Externally visible. Uses = 0 ----------- Globals ----------- ----------- Aliases ----------- What is going on with 'abort', why is it nearly always there, but not always (if I am correct) ?> > Aaron > > >> >> -Chris >> >> >> I get :- >> >> ---------- Functions ---------- >> llvm.memcpy.i64 >> Mangled name = llvm.memcpy.i64 >> DefaultVisibility >> ExternalLinkage - Externally visible. >> my_memcpy >> Mangled name = my_memcpy >> DefaultVisibility >> ExternalLinkage - Externally visible. >> my_memcpy2 >> Mangled name = my_memcpy2 >> DefaultVisibility >> ExternalLinkage - Externally visible. >> abort >> Mangled name = abort >> DefaultVisibility >> ExternalLinkage - Externally visible. >> ----------- Globals ----------- >> ----------- Aliases ----------- >> >> I am using this to define my symbols, but the relocations contain >> 'memcpy'. >> >> Aaron >> >> >> >> 2009/7/18 Eli Friedman <eli.friedman at gmail.com> >> >>> On Sat, Jul 18, 2009 at 2:21 PM, Aaron >>> Gray<aaronngray.lists at googlemail.com> wrote: >>> > I am working on the COFF backend and am wondering where llvm.memcpy >>> gets >>> > lowered to memcpy ? >>> >>> It's done by ISel. See SelectionDAG::getMemcpy. >>> >>> -Eli >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090718/71eb4dfb/attachment.html>
Chris Lattner
2009-Jul-18 23:01 UTC
[LLVMdev] Where does llvm.memcpy.i64 and friends get lowered ?
On Jul 18, 2009, at 3:28 PM, Aaron Gray wrote:> 2009/7/18 Chris Lattner <clattner at apple.com> > On Jul 18, 2009, at 2:56 PM, Aaron Gray wrote: > >> I am iterating through Modules symbols for 'test/CodeGen/X86/ >> memcpy.bc > > If you're iterating over functions, just ignore all intrinsics. > > Okay, but it would be nice if the Module object reflected the > lowered symbol names like 'memcpy' too. It seems a bit of an > inconsistancy for the Module not to reference this and have to pick > it up from the relocations.If you're iterating over the Module, you're not dealing with the codegen level. We want the code generator to change as little as possible when doing codegen.> Also there is the matter of 'abort' which seems to be defined by > most if not all modules even if it is not being used. I am using > GlobalValue::getUses() to filter it. Whats going on with 'abort' ?I have no idea what you're talking about. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090718/e154d6e9/attachment.html>
Aaron Gray
2009-Jul-18 23:45 UTC
[LLVMdev] Where does llvm.memcpy.i64 and friends get lowered ?
2009/7/19 Chris Lattner <clattner at apple.com>> On Jul 18, 2009, at 3:28 PM, Aaron Gray wrote: > > 2009/7/18 Chris Lattner <clattner at apple.com> > >> On Jul 18, 2009, at 2:56 PM, Aaron Gray wrote: >> >> I am iterating through Modules symbols for 'test/CodeGen/X86/memcpy.bc >> >> >> If you're iterating over functions, just ignore all intrinsics. >> > > Okay, but it would be nice if the Module object reflected the lowered > symbol names like 'memcpy' too. It seems a bit of an inconsistancy for the > Module not to reference this and have to pick it up from the relocations. > > > If you're iterating over the Module, you're not dealing with the codegen > level. We want the code generator to change as little as possible when > doing codegen. >No I'm doing the COFFWriter, its just that symbols are being introduced via relocations, but AFAICT they are not defined in the Module. This seems to be happening with memcpy and friends.> > Also there is the matter of 'abort' which seems to be defined by most if > not all modules even if it is not being used. I am > using GlobalValue::getUses() to filter it. Whats going on with 'abort' ? > > > I have no idea what you're talking about. >There is a function symbol called 'abort' that is being defined, whether it is used or not. Its not defined in the '.ll' file and useage count is zero, yet it is always nearly defined. I think there were a few test cases where it was not present, I will have to double check this. Aaron> > -Chris > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090719/fa484cc5/attachment.html>
Seemingly Similar Threads
- [LLVMdev] Where does llvm.memcpy.i64 and friends get lowered ?
- [LLVMdev] Where does llvm.memcpy.i64 and friends get lowered ?
- [LLVMdev] Where does llvm.memcpy.i64 and friends get lowered ?
- [LLVMdev] Where does llvm.memcpy.i64 and friends get lowered ?
- [LLVMdev] Where does llvm.memcpy.i64 and friends get lowered ?