[LLVMdev] Win32 JIT issue + bug in ScheduleDAGSNodes.h?
Bill Wendling
isanbard at gmail.com
Wed Dec 31 01:26:14 PST 2008
On Dec 30, 2008, at 4:51 PM, srs wrote:
> 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.
>
What is the assertion message?
-bw
> 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