Page MenuHomePhabricator

Make NumOperands and getNumOperands types be consistent.
Needs ReviewPublic

Authored by trixirt on Jun 29 2017, 4:09 PM.

Details

Reviewers
bogner
Summary

The problem with the compiler never finishing compiling a very large file was tracked down to an overflow of NumOperands.

The element was unsigned short, but it was assigned to by unsigned int in at least the SelectionDAG::createOperands method.
If one builds with -Weverything, the warning is

../include/llvm/CodeGen/SelectionDAG.h:347:30: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned short' [-Wconversion]

It was noted that the next element NumValues has a similar issue, but I do not have a test case to prove that.
The test case i do have is proprietary source and resists being reduced because the problem is that the compile never finishes.

Diff Detail

Repository
rL LLVM

Event Timeline

trixirt created this revision.Jun 29 2017, 4:09 PM