[LLVMdev] bug in TableGen when generating RegisterInfo?

zhangzuyu hitzzy at gmail.com
Tue Sep 6 17:52:34 PDT 2011

On Tue, Sep 6, 2011 at 9:34 PM, Alexandru Dura <alexdura at gmail.com> wrote:

> Hi everyone,
> I found some peculiar behavior of TableGen when generating
> [TARGET]GenRegisterInfo.inc. Some register overlaps are generated twice in
> this file, leading to a compilation error.


What do you mean "overlapped register"?

> I think this is because in RegisterInfoEmitter.cpp, RegisterAliases are
> declared as "std::map<Record*, std::set<Record*>, LessRecord>"
> and a requirement for std::map is that the comparison function
> ("LessRecord") should correspond to a strict weak ordering; in this case
> this points to :
>    "StringRef1.compare_numeric(StringRef2) < 0"
> which does not behave like strict weak ordering predicate on the set of
> strings. I have attached an example built upon snippets from StringRef.cpp,
> compiled with gcc version 4.4.5 (Debian 4.4.5-8) (I also saw that there is a
> workaround for gcc 4.x ...).
> Please tell me if I am doing something wrong or this is a real bug.
> Thank you,
> Alex
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

Yours truly,
Zhang Zuyu(张祖羽)

College of Computer Science and Technology, Harbin Engineering University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110907/5043aa49/attachment.html>

More information about the llvm-dev mailing list