Hi, here are some minor patches that for various reasons I've not submitted yet - I'm just trying to clear my list of differences before christmas... First of all the clear.patch file contains a patch that enables the JIT to drop all global mappings. I need this because when I have N threads I compile N different versions of my functions using different memory areas for global variables - it's also useful in other dynamic recompilation scenarios. Next the warnings.patch file contains some minor modification to make Visual Studio shut up (and possibly to make LLVM more 64bit friendly). I chose to typedef a size_type on the LLVM containers that try to mimic the std:: containers, while in the other case I just made a simple cast. Finally the leaks.patch file contains a destructor for the JITMemoryManager that frees system memory and a minor modification to how one particular singleton object gets instantiated in CommandLine.cpp to stop the VS leak detector complaining. m. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: leaks.patch URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20041213/b1901861/attachment.ksh> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: warnings.patch URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20041213/b1901861/attachment-0001.ksh> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: clear.patch URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20041213/b1901861/attachment-0002.ksh>
VS has a 64-bit portability mode, where it will complain when it sees non-portable code. I haven't tried it yet on LLVM, but in my experience it will generate a *lot* of warnings. Every time a size_t or ptrdiff_t is assigned to an int or even a long it will complain (Microsoft defines long as 32-bits, even in win64). On the other hand, gcc defines long as 64-bits on 64-bit Unix (so what does it do on cygwin or mingw?). The portability warnings are still useful, but it does mean that "long" must be banished from the code. Morten Ofstad wrote:> Next the warnings.patch file contains some minor modification to make > Visual Studio shut up (and possibly to make LLVM more 64bit friendly). >
Morten, Patches applied! Thanks. I'm not sure that the clear.patch has general applicability but I applied it anyway since you seem to need this convenience function. Reid. On Mon, 2004-12-13 at 05:30, Morten Ofstad wrote:> Hi, > > here are some minor patches that for various reasons I've not submitted > yet - I'm just trying to clear my list of differences before christmas... > > First of all the clear.patch file contains a patch that enables the JIT > to drop all global mappings. I need this because when I have N threads I > compile N different versions of my functions using different memory > areas for global variables - it's also useful in other dynamic > recompilation scenarios. > > Next the warnings.patch file contains some minor modification to make > Visual Studio shut up (and possibly to make LLVM more 64bit friendly). I > chose to typedef a size_type on the LLVM containers that try to mimic > the std:: containers, while in the other case I just made a simple cast. > > Finally the leaks.patch file contains a destructor for the > JITMemoryManager that frees system memory and a minor modification to > how one particular singleton object gets instantiated in CommandLine.cpp > to stop the VS leak detector complaining. > > m. > > ______________________________________________________________________ > Index: lib/ExecutionEngine/JIT/JITEmitter.cpp > ==================================================================> RCS file: /var/cvs/llvm/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp,v > retrieving revision 1.59 > diff -u -r1.59 JITEmitter.cpp > --- lib/ExecutionEngine/JIT/JITEmitter.cpp 5 Dec 2004 07:19:16 -0000 1.59 > +++ lib/ExecutionEngine/JIT/JITEmitter.cpp 6 Dec 2004 10:34:21 -0000 > @@ -51,6 +51,7 @@ > unsigned char *CurStubPtr, *CurFunctionPtr; > public: > JITMemoryManager(); > + ~JITMemoryManager(); > > inline unsigned char *allocateStub(unsigned StubSize); > inline unsigned char *startFunctionBody(); > @@ -69,6 +70,10 @@ > CurStubPtr = CurFunctionPtr = FunctionBase; > } > > +JITMemoryManager::~JITMemoryManager() { > + sys::Memory::ReleaseRWX(MemBlock); > +} > + > unsigned char *JITMemoryManager::allocateStub(unsigned StubSize) { > CurStubPtr -= StubSize; > if (CurStubPtr < MemBase) { > Index: lib/Support/Timer.cpp > ==================================================================> RCS file: /var/cvs/llvm/llvm/lib/Support/Timer.cpp,v > retrieving revision 1.33 > diff -u -r1.33 Timer.cpp > --- lib/Support/Timer.cpp 19 Nov 2004 04:59:07 -0000 1.33 > +++ lib/Support/Timer.cpp 3 Dec 2004 14:30:24 -0000 > @@ -33,12 +33,10 @@ > // problem is that a Statistic<> object gets destroyed, which ends up calling > // 'GetLibSupportInfoOutputFile()' (below), which calls this function. > // LibSupportInfoOutputFilename used to be a global variable, but sometimes it > -// would get destroyed before the Statistic, causing havoc to ensue. We "fix" > -// this by creating the string the first time it is needed and never destroying > -// it. > +// would get destroyed before the Statistic, causing havoc to ensue. > static std::string &getLibSupportInfoOutputFilename() { > - static std::string *LibSupportInfoOutputFilename = new std::string(); > - return *LibSupportInfoOutputFilename; > + static std::string LibSupportInfoOutputFilename; > + return LibSupportInfoOutputFilename; > } > > namespace { > > ______________________________________________________________________ > Index: include/llvm/Type.h > ==================================================================> RCS file: /var/cvs/llvm/llvm/include/llvm/Type.h,v > retrieving revision 1.67 > diff -u -r1.67 Type.h > --- include/llvm/Type.h 19 Nov 2004 16:39:04 -0000 1.67 > +++ include/llvm/Type.h 13 Dec 2004 13:11:57 -0000 > @@ -246,7 +246,8 @@ > > /// getNumContainedTypes - Return the number of types in the derived type. > /// > - unsigned getNumContainedTypes() const { return ContainedTys.size(); } > + typedef std::vector<PATypeHandle>::size_type size_type; > + size_type getNumContainedTypes() const { return ContainedTys.size(); } > > //===--------------------------------------------------------------------===// > // Static members exported by the Type class itself. Useful for getting > Index: include/llvm/Value.h > ==================================================================> RCS file: /var/cvs/llvm/llvm/include/llvm/Value.h,v > retrieving revision 1.66 > diff -u -r1.66 Value.h > --- include/llvm/Value.h 27 Oct 2004 16:14:47 -0000 1.66 > +++ include/llvm/Value.h 6 Dec 2004 11:24:02 -0000 > @@ -89,8 +89,9 @@ > // > typedef UseListIteratorWrapper use_iterator; > typedef UseListConstIteratorWrapper use_const_iterator; > + typedef iplist<Use>::size_type size_type; > > - unsigned use_size() const { return Uses.size(); } > + size_type use_size() const { return Uses.size(); } > bool use_empty() const { return Uses.empty(); } > use_iterator use_begin() { return Uses.begin(); } > use_const_iterator use_begin() const { return Uses.begin(); } > Index: include/llvm/Support/CommandLine.h > ==================================================================> RCS file: /var/cvs/llvm/llvm/include/llvm/Support/CommandLine.h,v > retrieving revision 1.40 > diff -u -r1.40 CommandLine.h > --- include/llvm/Support/CommandLine.h 5 Dec 2004 05:17:34 -0000 1.40 > +++ include/llvm/Support/CommandLine.h 6 Dec 2004 10:08:04 -0000 > @@ -435,7 +435,7 @@ > typedef DataType parser_data_type; > > // Implement virtual functions needed by generic_parser_base > - unsigned getNumOptions() const { return Values.size(); } > + unsigned getNumOptions() const { return (unsigned)Values.size(); } > const char *getOption(unsigned N) const { return Values[N].first; } > const char *getDescription(unsigned N) const { > return Values[N].second.second; > > ______________________________________________________________________ > Index: include/llvm/ExecutionEngine/ExecutionEngine.h > ==================================================================> RCS file: /var/cvs/llvm/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h,v > retrieving revision 1.30 > diff -u -r1.30 ExecutionEngine.h > --- include/llvm/ExecutionEngine/ExecutionEngine.h 22 Nov 2004 16:54:54 -0000 1.30 > +++ include/llvm/ExecutionEngine/ExecutionEngine.h 3 Dec 2004 13:50:59 -0000 > @@ -93,6 +93,13 @@ > } > } > > + /// clearAllGlobalMappings - Clear all global mappings and start over again > + /// use in dynamic compilation scenarios when you want to move globals > + void clearAllGlobalMappings() { > + GlobalAddressMap.clear(); > + GlobalAddressReverseMap.clear(); > + } > + > /// updateGlobalMapping - Replace an existing mapping for GV with a new > /// address. This updates both maps as required. > void updateGlobalMapping(const GlobalValue *GV, void *Addr) { > > ______________________________________________________________________ > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- 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/20041213/a1eb77c4/attachment.sig>
On Mon, 13 Dec 2004, Jeff Cohen wrote:> VS has a 64-bit portability mode, where it will complain when it sees > non-portable code. I haven't tried it yet on LLVM, but in my experience it > will generate a *lot* of warnings. Every time a size_t or ptrdiff_t is > assigned to an int or even a long it will complain (Microsoft defines long as > 32-bits, even in win64). On the other hand, gcc defines long as 64-bits on > 64-bit Unix (so what does it do on cygwin or mingw?). The portability > warnings are still useful, but it does mean that "long" must be banished from > the code.I think that the 'bad' habit that occurs in LLVM code is assuming that 'int' is 32-bits and 'long long' is 64-bit. I don't think that these assumptions fail on any machine that we currently care about, though if desired, these could be cleaned up. I don't think we use 'long' extensively (it varies in sizes on hosts we already support well, so it can't be trusted ;-). As you're noticing, we do assume that 'unsigned' can hold various STL size_types though. -Chris>> Next the warnings.patch file contains some minor modification to make >> Visual Studio shut up (and possibly to make LLVM more 64bit friendly). >> > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev >-Chris -- http://nondot.org/sabre/ http://llvm.cs.uiuc.edu/
Jeff Cohen wrote:> VS has a 64-bit portability mode, where it will complain when it sees > non-portable code. I haven't tried it yet on LLVM, but in my experience > it will generate a *lot* of warnings. Every time a size_t or ptrdiff_t > is assigned to an int or even a long it will complain (Microsoft defines > long as 32-bits, even in win64). On the other hand, gcc defines long as > 64-bits on 64-bit Unix (so what does it do on cygwin or mingw?). The > portability warnings are still useful, but it does mean that "long" must > be banished from the code.I'm not trying to eliminate the warnings when compiling LLVM -- I'm trying to eliminate the warnings in applications _using_ LLVM which might be (as in our case) using the 64-bit portability mode. So I only want to patch some very commonly included header files in order to compile our application cleanly. I am absolutely not suggesting to banish "long" from the code. m.
Morten, The leaks.patch file introduced a static destructor ordering problem which lead to garbled output. The comment above those lines of code indicates why it needs to be the way it is. My bad for committing it in the first place. Please be careful in the future. Reid. On Mon, 2004-12-13 at 05:30, Morten Ofstad wrote:> Hi, > > here are some minor patches that for various reasons I've not submitted > yet - I'm just trying to clear my list of differences before christmas... > > First of all the clear.patch file contains a patch that enables the JIT > to drop all global mappings. I need this because when I have N threads I > compile N different versions of my functions using different memory > areas for global variables - it's also useful in other dynamic > recompilation scenarios. > > Next the warnings.patch file contains some minor modification to make > Visual Studio shut up (and possibly to make LLVM more 64bit friendly). I > chose to typedef a size_type on the LLVM containers that try to mimic > the std:: containers, while in the other case I just made a simple cast. > > Finally the leaks.patch file contains a destructor for the > JITMemoryManager that frees system memory and a minor modification to > how one particular singleton object gets instantiated in CommandLine.cpp > to stop the VS leak detector complaining. > > m. > > ______________________________________________________________________ > Index: lib/ExecutionEngine/JIT/JITEmitter.cpp > ==================================================================> RCS file: /var/cvs/llvm/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp,v > retrieving revision 1.59 > diff -u -r1.59 JITEmitter.cpp > --- lib/ExecutionEngine/JIT/JITEmitter.cpp 5 Dec 2004 07:19:16 -0000 1.59 > +++ lib/ExecutionEngine/JIT/JITEmitter.cpp 6 Dec 2004 10:34:21 -0000 > @@ -51,6 +51,7 @@ > unsigned char *CurStubPtr, *CurFunctionPtr; > public: > JITMemoryManager(); > + ~JITMemoryManager(); > > inline unsigned char *allocateStub(unsigned StubSize); > inline unsigned char *startFunctionBody(); > @@ -69,6 +70,10 @@ > CurStubPtr = CurFunctionPtr = FunctionBase; > } > > +JITMemoryManager::~JITMemoryManager() { > + sys::Memory::ReleaseRWX(MemBlock); > +} > + > unsigned char *JITMemoryManager::allocateStub(unsigned StubSize) { > CurStubPtr -= StubSize; > if (CurStubPtr < MemBase) { > Index: lib/Support/Timer.cpp > ==================================================================> RCS file: /var/cvs/llvm/llvm/lib/Support/Timer.cpp,v > retrieving revision 1.33 > diff -u -r1.33 Timer.cpp > --- lib/Support/Timer.cpp 19 Nov 2004 04:59:07 -0000 1.33 > +++ lib/Support/Timer.cpp 3 Dec 2004 14:30:24 -0000 > @@ -33,12 +33,10 @@ > // problem is that a Statistic<> object gets destroyed, which ends up calling > // 'GetLibSupportInfoOutputFile()' (below), which calls this function. > // LibSupportInfoOutputFilename used to be a global variable, but sometimes it > -// would get destroyed before the Statistic, causing havoc to ensue. We "fix" > -// this by creating the string the first time it is needed and never destroying > -// it. > +// would get destroyed before the Statistic, causing havoc to ensue. > static std::string &getLibSupportInfoOutputFilename() { > - static std::string *LibSupportInfoOutputFilename = new std::string(); > - return *LibSupportInfoOutputFilename; > + static std::string LibSupportInfoOutputFilename; > + return LibSupportInfoOutputFilename; > } > > namespace { > > ______________________________________________________________________ > Index: include/llvm/Type.h > ==================================================================> RCS file: /var/cvs/llvm/llvm/include/llvm/Type.h,v > retrieving revision 1.67 > diff -u -r1.67 Type.h > --- include/llvm/Type.h 19 Nov 2004 16:39:04 -0000 1.67 > +++ include/llvm/Type.h 13 Dec 2004 13:11:57 -0000 > @@ -246,7 +246,8 @@ > > /// getNumContainedTypes - Return the number of types in the derived type. > /// > - unsigned getNumContainedTypes() const { return ContainedTys.size(); } > + typedef std::vector<PATypeHandle>::size_type size_type; > + size_type getNumContainedTypes() const { return ContainedTys.size(); } > > //===--------------------------------------------------------------------===// > // Static members exported by the Type class itself. Useful for getting > Index: include/llvm/Value.h > ==================================================================> RCS file: /var/cvs/llvm/llvm/include/llvm/Value.h,v > retrieving revision 1.66 > diff -u -r1.66 Value.h > --- include/llvm/Value.h 27 Oct 2004 16:14:47 -0000 1.66 > +++ include/llvm/Value.h 6 Dec 2004 11:24:02 -0000 > @@ -89,8 +89,9 @@ > // > typedef UseListIteratorWrapper use_iterator; > typedef UseListConstIteratorWrapper use_const_iterator; > + typedef iplist<Use>::size_type size_type; > > - unsigned use_size() const { return Uses.size(); } > + size_type use_size() const { return Uses.size(); } > bool use_empty() const { return Uses.empty(); } > use_iterator use_begin() { return Uses.begin(); } > use_const_iterator use_begin() const { return Uses.begin(); } > Index: include/llvm/Support/CommandLine.h > ==================================================================> RCS file: /var/cvs/llvm/llvm/include/llvm/Support/CommandLine.h,v > retrieving revision 1.40 > diff -u -r1.40 CommandLine.h > --- include/llvm/Support/CommandLine.h 5 Dec 2004 05:17:34 -0000 1.40 > +++ include/llvm/Support/CommandLine.h 6 Dec 2004 10:08:04 -0000 > @@ -435,7 +435,7 @@ > typedef DataType parser_data_type; > > // Implement virtual functions needed by generic_parser_base > - unsigned getNumOptions() const { return Values.size(); } > + unsigned getNumOptions() const { return (unsigned)Values.size(); } > const char *getOption(unsigned N) const { return Values[N].first; } > const char *getDescription(unsigned N) const { > return Values[N].second.second; > > ______________________________________________________________________ > Index: include/llvm/ExecutionEngine/ExecutionEngine.h > ==================================================================> RCS file: /var/cvs/llvm/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h,v > retrieving revision 1.30 > diff -u -r1.30 ExecutionEngine.h > --- include/llvm/ExecutionEngine/ExecutionEngine.h 22 Nov 2004 16:54:54 -0000 1.30 > +++ include/llvm/ExecutionEngine/ExecutionEngine.h 3 Dec 2004 13:50:59 -0000 > @@ -93,6 +93,13 @@ > } > } > > + /// clearAllGlobalMappings - Clear all global mappings and start over again > + /// use in dynamic compilation scenarios when you want to move globals > + void clearAllGlobalMappings() { > + GlobalAddressMap.clear(); > + GlobalAddressReverseMap.clear(); > + } > + > /// updateGlobalMapping - Replace an existing mapping for GV with a new > /// address. This updates both maps as required. > void updateGlobalMapping(const GlobalValue *GV, void *Addr) { > > ______________________________________________________________________ > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- 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/20041213/80cc3914/attachment.sig>
On Mon, 13 Dec 2004, Reid Spencer wrote:> Morten, > > The leaks.patch file introduced a static destructor ordering problem > which lead to garbled output. The comment above those lines of code > indicates why it needs to be the way it is. My bad for committing it in > the first place. Please be careful in the future.More specifically, the lib/Support/Timer.cpp change was the problem, and was reverted: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041213/022289.html -Chris> On Mon, 2004-12-13 at 05:30, Morten Ofstad wrote: >> Hi, >> >> here are some minor patches that for various reasons I've not submitted >> yet - I'm just trying to clear my list of differences before christmas... >> >> First of all the clear.patch file contains a patch that enables the JIT >> to drop all global mappings. I need this because when I have N threads I >> compile N different versions of my functions using different memory >> areas for global variables - it's also useful in other dynamic >> recompilation scenarios. >> >> Next the warnings.patch file contains some minor modification to make >> Visual Studio shut up (and possibly to make LLVM more 64bit friendly). I >> chose to typedef a size_type on the LLVM containers that try to mimic >> the std:: containers, while in the other case I just made a simple cast. >> >> Finally the leaks.patch file contains a destructor for the >> JITMemoryManager that frees system memory and a minor modification to >> how one particular singleton object gets instantiated in CommandLine.cpp >> to stop the VS leak detector complaining. >> >> m. >> >> ______________________________________________________________________ >> Index: lib/ExecutionEngine/JIT/JITEmitter.cpp >> ==================================================================>> RCS file: /var/cvs/llvm/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp,v >> retrieving revision 1.59 >> diff -u -r1.59 JITEmitter.cpp >> --- lib/ExecutionEngine/JIT/JITEmitter.cpp 5 Dec 2004 07:19:16 -0000 1.59 >> +++ lib/ExecutionEngine/JIT/JITEmitter.cpp 6 Dec 2004 10:34:21 -0000 >> @@ -51,6 +51,7 @@ >> unsigned char *CurStubPtr, *CurFunctionPtr; >> public: >> JITMemoryManager(); >> + ~JITMemoryManager(); >> >> inline unsigned char *allocateStub(unsigned StubSize); >> inline unsigned char *startFunctionBody(); >> @@ -69,6 +70,10 @@ >> CurStubPtr = CurFunctionPtr = FunctionBase; >> } >> >> +JITMemoryManager::~JITMemoryManager() { >> + sys::Memory::ReleaseRWX(MemBlock); >> +} >> + >> unsigned char *JITMemoryManager::allocateStub(unsigned StubSize) { >> CurStubPtr -= StubSize; >> if (CurStubPtr < MemBase) { >> Index: lib/Support/Timer.cpp >> ==================================================================>> RCS file: /var/cvs/llvm/llvm/lib/Support/Timer.cpp,v >> retrieving revision 1.33 >> diff -u -r1.33 Timer.cpp >> --- lib/Support/Timer.cpp 19 Nov 2004 04:59:07 -0000 1.33 >> +++ lib/Support/Timer.cpp 3 Dec 2004 14:30:24 -0000 >> @@ -33,12 +33,10 @@ >> // problem is that a Statistic<> object gets destroyed, which ends up calling >> // 'GetLibSupportInfoOutputFile()' (below), which calls this function. >> // LibSupportInfoOutputFilename used to be a global variable, but sometimes it >> -// would get destroyed before the Statistic, causing havoc to ensue. We "fix" >> -// this by creating the string the first time it is needed and never destroying >> -// it. >> +// would get destroyed before the Statistic, causing havoc to ensue. >> static std::string &getLibSupportInfoOutputFilename() { >> - static std::string *LibSupportInfoOutputFilename = new std::string(); >> - return *LibSupportInfoOutputFilename; >> + static std::string LibSupportInfoOutputFilename; >> + return LibSupportInfoOutputFilename; >> } >> >> namespace { >> >> ______________________________________________________________________ >> Index: include/llvm/Type.h >> ==================================================================>> RCS file: /var/cvs/llvm/llvm/include/llvm/Type.h,v >> retrieving revision 1.67 >> diff -u -r1.67 Type.h >> --- include/llvm/Type.h 19 Nov 2004 16:39:04 -0000 1.67 >> +++ include/llvm/Type.h 13 Dec 2004 13:11:57 -0000 >> @@ -246,7 +246,8 @@ >> >> /// getNumContainedTypes - Return the number of types in the derived type. >> /// >> - unsigned getNumContainedTypes() const { return ContainedTys.size(); } >> + typedef std::vector<PATypeHandle>::size_type size_type; >> + size_type getNumContainedTypes() const { return ContainedTys.size(); } >> >> //===--------------------------------------------------------------------===// >> // Static members exported by the Type class itself. Useful for getting >> Index: include/llvm/Value.h >> ==================================================================>> RCS file: /var/cvs/llvm/llvm/include/llvm/Value.h,v >> retrieving revision 1.66 >> diff -u -r1.66 Value.h >> --- include/llvm/Value.h 27 Oct 2004 16:14:47 -0000 1.66 >> +++ include/llvm/Value.h 6 Dec 2004 11:24:02 -0000 >> @@ -89,8 +89,9 @@ >> // >> typedef UseListIteratorWrapper use_iterator; >> typedef UseListConstIteratorWrapper use_const_iterator; >> + typedef iplist<Use>::size_type size_type; >> >> - unsigned use_size() const { return Uses.size(); } >> + size_type use_size() const { return Uses.size(); } >> bool use_empty() const { return Uses.empty(); } >> use_iterator use_begin() { return Uses.begin(); } >> use_const_iterator use_begin() const { return Uses.begin(); } >> Index: include/llvm/Support/CommandLine.h >> ==================================================================>> RCS file: /var/cvs/llvm/llvm/include/llvm/Support/CommandLine.h,v >> retrieving revision 1.40 >> diff -u -r1.40 CommandLine.h >> --- include/llvm/Support/CommandLine.h 5 Dec 2004 05:17:34 -0000 1.40 >> +++ include/llvm/Support/CommandLine.h 6 Dec 2004 10:08:04 -0000 >> @@ -435,7 +435,7 @@ >> typedef DataType parser_data_type; >> >> // Implement virtual functions needed by generic_parser_base >> - unsigned getNumOptions() const { return Values.size(); } >> + unsigned getNumOptions() const { return (unsigned)Values.size(); } >> const char *getOption(unsigned N) const { return Values[N].first; } >> const char *getDescription(unsigned N) const { >> return Values[N].second.second; >> >> ______________________________________________________________________ >> Index: include/llvm/ExecutionEngine/ExecutionEngine.h >> ==================================================================>> RCS file: /var/cvs/llvm/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h,v >> retrieving revision 1.30 >> diff -u -r1.30 ExecutionEngine.h >> --- include/llvm/ExecutionEngine/ExecutionEngine.h 22 Nov 2004 16:54:54 -0000 1.30 >> +++ include/llvm/ExecutionEngine/ExecutionEngine.h 3 Dec 2004 13:50:59 -0000 >> @@ -93,6 +93,13 @@ >> } >> } >> >> + /// clearAllGlobalMappings - Clear all global mappings and start over again >> + /// use in dynamic compilation scenarios when you want to move globals >> + void clearAllGlobalMappings() { >> + GlobalAddressMap.clear(); >> + GlobalAddressReverseMap.clear(); >> + } >> + >> /// updateGlobalMapping - Replace an existing mapping for GV with a new >> /// address. This updates both maps as required. >> void updateGlobalMapping(const GlobalValue *GV, void *Addr) { >> >> ______________________________________________________________________ >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev >-Chris -- http://nondot.org/sabre/ http://llvm.cs.uiuc.edu/