Hi, I am attempting to compile the llvm distribution with the Intel Compiler 8.0 on linux and I have some minor patches I would like to apply. In our project we compile and run the code both on win32, together with Morten Ofstad using the MS compiler, and on linux using the intel compiler. I have wrapped the extra code to make llvm compile for icc in #ifdef __INTEL_COMPILER #endif The patches in llvm/autoconf is to assure the configure scripts allows the compiler icc to be run during the macro "checking tools compability". PS: It would be nice if from the configure options one could choose more strictly amongst whats going to be compiled and not. E.g., I would like to say I would only compile the libs (no tools or utillities), neither do I need the compression support like bzlib. PPS: The Makefile.rules file clearly defined gcc compile time flags, if I create a "--enable-intel-compiler" option and perform a global naming in such a way that one could differentiate between the GNU compiler and the ICC compiler - and hence setup the compile-time flags - would that be the way to go? Sincerely Bjornw> Bjørn Wennberg | bjornw at hue.no | +47 98678266 | http://www.hue.no -------------- next part -------------- A non-text attachment was scrubbed... Name: intel.diff Type: application/octet-stream Size: 14477 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20041208/29647a5b/attachment.obj>
On Wed, 8 Dec 2004, [iso-8859-1] Bj�rn Wennberg wrote:> I am attempting to compile the llvm distribution with the Intel Compiler 8.0 > on linux and I have some minor patches I would like to apply. In our project > we compile and run the code both on win32, together with Morten Ofstad using > the MS compiler, and on linux using the intel compiler.Great! I'm going to leave the configury stuff to Reid, but here's some feedback on the rest of the patches. I've committed a bunch of them: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021867.html http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021868.html http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021869.html http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021870.html http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021872.html http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021873.html However, could you explain why there hunks are needed? For changes like this, it is usually good to separate the "obvious" changes from the others into distinct patches. Here are the ones that would be good to have comments added to them explaining them: DataStructure/DSGraph.h: why is the method moved out of line? Please add a comment before the out-of-line body indicating why it should not be moved back inline. Analysis/AliasAnalysis.cpp: why don't you need the external stub? Does it work for you like this? namespace llvm { extern void BasicAAStub(); } include/llvm/ADT/HashExtras.h: Is pointer support already built into the intel headers, making the hash implementation unneeded? If so, please add a comment to the #ifndef indicating that. As a general comment, please keep source lines within 80 columns. Otherwise the patches look great, thanks a lot! -Chris -- http://nondot.org/sabre/ http://llvm.cs.uiuc.edu/
Chris, include/llvm/ADT/HashExtras.h I did some more testing on this topic: ICC complained that the last template was partially loaded and would be used to instantiate the template<> struct hash<const char *>. Rearranging the templates so that one for arbritraty pointers (inlined) comes first, works excellent for icc. E.g.: template <class T> struct hash<T *> { inline size_t operator()(const T *Val) const { return reinterpret_cast<size_t>(Val); } }; template <> struct hash<std::string> { size_t operator()(std::string const &str) const { return hash<char const *>()(str.c_str()); } }; include/llvm/Analysis/DataStructure/DSGraph.h The inline function uses std::find() which is defined in <algorithm>. <algorithm> is only included in the implementation file of DataStructure.cpp. The choise was either to include <algorithm> in the headerfile (increasing potentially overall compilation time), or defining the function in the .cpp file. I chose the latter to be conformant with what you do. lib/Analysis/AliasAnalysis.cpp ICC gives me an error saying the function is already declared as extern. However, as you suggest: namespace llvm { extern void BasicAAStub(); }; Works like a charm ! Thanx. (Should have thought of that....) Sincerely Bjornw> -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Chris Lattner Sent: Wednesday, December 08, 2004 5:43 PM To: LLVM Developers Mailing List Subject: Re: [LLVMdev] Compiling with Intel c++ 8.0 On Wed, 8 Dec 2004, [iso-8859-1] Bjxrn Wennberg wrote:> I am attempting to compile the llvm distribution with the Intel > Compiler 8.0 on linux and I have some minor patches I would like to > apply. In our project we compile and run the code both on win32, > together with Morten Ofstad using the MS compiler, and on linux using theintel compiler. Great! I'm going to leave the configury stuff to Reid, but here's some feedback on the rest of the patches. I've committed a bunch of them: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021867.h tml http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021868.h tml http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021869.h tml http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021870.h tml http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021872.h tml http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021873.h tml However, could you explain why there hunks are needed? For changes like this, it is usually good to separate the "obvious" changes from the others into distinct patches. Here are the ones that would be good to have comments added to them explaining them: DataStructure/DSGraph.h: why is the method moved out of line? Please add a comment before the out-of-line body indicating why it should not be moved back inline. Analysis/AliasAnalysis.cpp: why don't you need the external stub? Does it work for you like this? namespace llvm { extern void BasicAAStub(); } include/llvm/ADT/HashExtras.h: Is pointer support already built into the intel headers, making the hash implementation unneeded? If so, please add a comment to the #ifndef indicating that. As a general comment, please keep source lines within 80 columns. Otherwise the patches look great, thanks a lot! -Chris -- http://nondot.org/sabre/ http://llvm.cs.uiuc.edu/
The autoconf.ac and configure script changes have also been applied. Thanks, Bjrn. Reid. On Wed, 2004-12-08 at 08:43, Chris Lattner wrote:> On Wed, 8 Dec 2004, [iso-8859-1] Bjrn Wennberg wrote: > > > I am attempting to compile the llvm distribution with the Intel Compiler 8.0 > > on linux and I have some minor patches I would like to apply. In our project > > we compile and run the code both on win32, together with Morten Ofstad using > > the MS compiler, and on linux using the intel compiler. > > Great! I'm going to leave the configury stuff to Reid, but here's some > feedback on the rest of the patches. I've committed a bunch of them: > http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021867.html > http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021868.html > http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021869.html > http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021870.html > http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021872.html > http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041206/021873.html > > However, could you explain why there hunks are needed? For changes like > this, it is usually good to separate the "obvious" changes from the others > into distinct patches. Here are the ones that would be good to have > comments added to them explaining them: > > DataStructure/DSGraph.h: why is the method moved out of line? Please add > a comment before the out-of-line body indicating why it should not be > moved back inline. > > Analysis/AliasAnalysis.cpp: why don't you need the external stub? Does it > work for you like this? > > namespace llvm { > extern void BasicAAStub(); > } > > include/llvm/ADT/HashExtras.h: Is pointer support already built into the > intel headers, making the hash implementation unneeded? If so, please add > a comment to the #ifndef indicating that. > > As a general comment, please keep source lines within 80 columns. > Otherwise the patches look great, thanks a lot! > > -Chris-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20041208/0fca2027/attachment.sig>