Nicholas Chapman
2012-Dec-04 11:28 UTC
[LLVMdev] Visual Studio 2012 cl.exe ICE while building LLVM for x64 (in TableGen) at -O2
On 04/12/2012 06:29, Michael Spencer wrote:> On Mon, Dec 3, 2012 at 8:08 PM, Gordon Keiser <gkeiser at arxan.com> wrote: >> As an update to this: >> http://connect.microsoft.com/VisualStudio/feedback/details/769222/cl-exe-ice-when-building-llvm-trunk-at-o2 >> >> Microsoft has reproduced the ICE, given a workaround, and is planning a fix for a future MSVC release. I know not a lot of people are building with VS, but it's nice to know. The workaround involves marking a single function with attribute((noinline)) and is detailed on the page, so nothing too horrible there. > I'm guessing this was specific to the arm backend. As quite a few > people are building with MSVC daily. > >No, it happens targeting x64, and maybe x86 as well. Nick C.
Gordon Keiser
2012-Dec-04 23:18 UTC
[LLVMdev] Visual Studio 2012 cl.exe ICE while building LLVM for x64 (in TableGen) at -O2
> On Behalf Of Nicholas Chapman > > On 04/12/2012 06:29, Michael Spencer wrote: > > On Mon, Dec 3, 2012 at 8:08 PM, Gordon Keiser <gkeiser at arxan.com> > wrote: > >> As an update to this: > >> http://connect.microsoft.com/VisualStudio/feedback/details/769222/cl- > >> exe-ice-when-building-llvm-trunk-at-o2 > >> > >> Microsoft has reproduced the ICE, given a workaround, and is planning a > fix for a future MSVC release. I know not a lot of people are building with > VS, but it's nice to know. The workaround involves marking a single function > with attribute((noinline)) and is detailed on the page, so nothing too horrible > there. > > I'm guessing this was specific to the arm backend. As quite a few > > people are building with MSVC daily. > > > > > No, it happens targeting x64, and maybe x86 as well. > > Nick C.Right, it's specific to Visual Studio 2012, the crash happens in two tablegen files when inlining utostr. I've not run into it building with 2010 or 2008. It's rather odd that utostr_32 doesn't cause the same issue since they share nearly identical code. Gordon Keiser Software Development Engineer Arxan Technologies Protecting the App EconomyT> _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
NAKAMURA Takumi
2012-Dec-07 07:21 UTC
[LLVMdev] Visual Studio 2012 cl.exe ICE while building LLVM for x64 (in TableGen) at -O2
I have reproduced one also on VS10 x64|RelWithDebInfo. I suggest simply tweak usage. --- a/llvm/lib/TableGen/TGParser.cpp +++ b/llvm/lib/TableGen/TGParser.cpp @@ -379,7 +379,8 @@ static bool isObjectStart(tgtok::TokKind K) { static std::string GetNewAnonymousName() { static unsigned AnonCounter = 0; - return "anonymous."+utostr(AnonCounter++); + unsigned n = AnonCounter++; + return "anonymous."+utostr(n); } /// ParseObjectName - If an object name is specified, return it. Otherwise, diff --git a/llvm/utils/TableGen/CodeGenRegisters.cpp b/llvm/utils/TableGen/CodeGenRegisters.cpp index 20d439f..20933bf 100644 --- a/llvm/utils/TableGen/CodeGenRegisters.cpp +++ b/llvm/utils/TableGen/CodeGenRegisters.cpp @@ -701,7 +701,8 @@ CodeGenRegisterClass::CodeGenRegisterClass(CodeGenRegBank &RegBank, Record *R) // Rename anonymous register classes. if (R->getName().size() > 9 && R->getName()[9] == '.') { static unsigned AnonCounter = 0; - R->setName("AnonRegClass_"+utostr(AnonCounter++)); + R->setName("AnonRegClass_"+utostr(AnonCounter)); + ++AnonCounter; } std::vector<Record*> TypeList = R->getValueAsListOfDefs("RegTypes"); FYI, utosotr(++AnonCounter) could be accepted if 0-origination were not important. ...Takumi 2012/12/5 Gordon Keiser <gkeiser at arxan.com>:>> On Behalf Of Nicholas Chapman >> >> On 04/12/2012 06:29, Michael Spencer wrote: >> > On Mon, Dec 3, 2012 at 8:08 PM, Gordon Keiser <gkeiser at arxan.com> >> wrote: >> >> As an update to this: >> >> http://connect.microsoft.com/VisualStudio/feedback/details/769222/cl- >> >> exe-ice-when-building-llvm-trunk-at-o2 >> >> >> >> Microsoft has reproduced the ICE, given a workaround, and is planning a >> fix for a future MSVC release. I know not a lot of people are building with >> VS, but it's nice to know. The workaround involves marking a single function >> with attribute((noinline)) and is detailed on the page, so nothing too horrible >> there. >> > I'm guessing this was specific to the arm backend. As quite a few >> > people are building with MSVC daily. >> > >> > >> No, it happens targeting x64, and maybe x86 as well. >> >> Nick C. > > Right, it's specific to Visual Studio 2012, the crash happens in two tablegen files when inlining utostr. I've not run into it building with 2010 or 2008. It's rather odd that utostr_32 doesn't cause the same issue since they share nearly identical code. > > Gordon Keiser > Software Development Engineer > Arxan Technologies > Protecting the App EconomyT > >> _______________________________________________ >> 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
Gordon Keiser
2013-Apr-11 02:09 UTC
[LLVMdev] Visual Studio 2012 cl.exe ICE while building LLVM for x64 (in TableGen) at -O2
Reviving the ancient post, but MS has fixed the ICE in VS2012 Update 2 : Under C++ Fixes: * An internal compiler error occurs when you buiuld[sic] an LLVM-based project by using an x64-based compiler. I haven't verified personally yet but since they had a full repro I'm going to trust them on that one... :-) Cheers, Gordon Keiser Software Development Engineer Arxan Technologies gkeiser at arxan.com www.arxan.com Protecting the App Economy(tm)> -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On Behalf Of Gordon Keiser > Sent: Tuesday, December 04, 2012 6:18 PM > To: nick at indigorenderer.com; llvmdev at cs.uiuc.edu > Subject: Re: [LLVMdev] Visual Studio 2012 cl.exe ICE while building LLVM for > x64 (in TableGen) at -O2 > > > On Behalf Of Nicholas Chapman > > > > On 04/12/2012 06:29, Michael Spencer wrote: > > > On Mon, Dec 3, 2012 at 8:08 PM, Gordon Keiser <gkeiser at arxan.com> > > wrote: > > >> As an update to this: > > >> http://connect.microsoft.com/VisualStudio/feedback/details/769222/c > > >> l- > > >> exe-ice-when-building-llvm-trunk-at-o2 > > >> > > >> Microsoft has reproduced the ICE, given a workaround, and is > > >> planning a > > fix for a future MSVC release. I know not a lot of people are building with > > VS, but it's nice to know. The workaround involves marking a single > > function with attribute((noinline)) and is detailed on the page, so > > nothing too horrible there. > > > I'm guessing this was specific to the arm backend. As quite a few > > > people are building with MSVC daily. > > > > > > > > No, it happens targeting x64, and maybe x86 as well. > > > > Nick C. > > Right, it's specific to Visual Studio 2012, the crash happens in two tablegen > files when inlining utostr. I've not run into it building with 2010 or 2008. It's > rather odd that utostr_32 doesn't cause the same issue since they share > nearly identical code. > > Gordon Keiser > Software Development Engineer > Arxan Technologies > Protecting the App EconomyT > > > _______________________________________________ > > 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
Apparently Analagous Threads
- [LLVMdev] Visual Studio 2012 cl.exe ICE while building LLVM for x64 (in TableGen) at -O2
- [LLVMdev] Visual Studio 2012 cl.exe ICE while building LLVM for x64 (in TableGen) at -O2
- [LLVMdev] Visual Studio 2012 cl.exe ICE while building LLVM for x64 (in TableGen) at -O2
- [LLVMdev] Broken PLT on ARM from R183966
- [LLVMdev] Broken PLT on ARM from R183966