[PATCH] D60719: Demonstrate how to fix freestanding for memcpy

2019-04-18 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. In D60719#1470632 , @t.p.northover wrote: > > IIUC freestanding environment should not rely on memcpy being present so my > > take on it was that by "fixing" freestanding I could have my cake and eat > > it too. > > The formal

[PATCH] D60719: Demonstrate how to fix freestanding for memcpy

2019-04-17 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover added a comment. > IIUC freestanding environment should not rely on memcpy being present so my > take on it was that by "fixing" freestanding I could have my cake and eat it > too. The formal situation is that freestanding implementations are only required to provide language sup

[PATCH] D60719: Demonstrate how to fix freestanding for memcpy

2019-04-17 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. In D60719#1469958 , @t.p.northover wrote: > I think it'd be pretty unpopular with the people I know who use freestanding. > They're mostly working on microcontrollers and compiling -Oz so the extra > code size would be untenab

[PATCH] D60719: Demonstrate how to fix freestanding for memcpy

2019-04-17 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover added a comment. I think it'd be pretty unpopular with the people I know who use freestanding. They're mostly working on microcontrollers and compiling -Oz so the extra code size would be untenable; they also have memcpy implementations anyway because they use it in their own code

[PATCH] D60719: Demonstrate how to fix freestanding for memcpy

2019-04-17 Thread Clement Courbet via Phabricator via cfe-commits
courbet added a comment. As discussed offline, I think this should go through an RFC process. I guess the main reservation that people will have is that this might generate a very large number of load stores (because we don't have a good way to generate loops here). This is not an issue for X86

[PATCH] D60719: Demonstrate how to fix freestanding for memcpy

2019-04-16 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 195369. gchatelet added a comment. Add test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60719/new/ https://reviews.llvm.org/D60719 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/test/CodeGen/freesta