[LLVMdev] Win32 JIT issue + bug in ScheduleDAGSNodes.h?
srs
skaflotten at gmail.com
Tue Dec 30 16:51:43 PST 2008
Hi all,
While testing my compiler on win32 in JIT mode, I ran into a couple of
issues:
1. I linked the compiler with the lib files resulting from the cmake
created VS.NET build. While everything built just fine, the
ExecutionEngine::create call always returned NULL. The fix was to also
link with JIT.obj (thanks aKor for pointing me in the right direction).
I would have thought that linking with LLVMJIT.lib should suffice... a
VC++ linker issue?
2. There seems to be an issue in ScheduleDAGSDNodes.h when in debug
mode. The problem is the evaluation of "&SUnits[0];" which ASSERT's in
VC++'s vector[] implementation (when _HAS_ITERATOR_DEBUGGING is on).
As a work-around, I commented out the debug code (see "patch" below.)
What would the proper solution be? The idiom appears to be allowed by
the C++03 standard, but at least VC++ 2008 Express Edition with
_HAS_ITERATOR_DEBUGGING fails.
Best regards,
Stein Roger
Index: include/llvm/CodeGen/ScheduleDAGSDNodes.h
===================================================================
--- include/llvm/CodeGen/ScheduleDAGSDNodes.h (revision 61500)
+++ include/llvm/CodeGen/ScheduleDAGSDNodes.h (working copy)
@@ -103,10 +103,10 @@
///
SUnit *NewSUnit(SDNode *N) {
#ifndef NDEBUG
- const SUnit *Addr = &SUnits[0];
+ //const SUnit *Addr = &SUnits[0];
#endif
SUnits.push_back(SUnit(N, (unsigned)SUnits.size()));
- assert(Addr == &SUnits[0] && "SUnits std::vector reallocated on
the fly!");
+ //assert(Addr == &SUnits[0] && "SUnits std::vector reallocated on
the fly!");
SUnits.back().OrigNode = &SUnits.back();
return &SUnits.back();
}
More information about the llvm-dev
mailing list