This is an archive of the discontinued LLVM Phabricator instance.

Don't allow -optimize-regalloc=false with -regalloc given for anything other than 'fast'
ClosedPublic

Authored by jonpa on May 15 2017, 1:23 AM.

Details

Summary

This fixes https://bugs.llvm.org/show_bug.cgi?id=33022:

I discovered that the use of these two options made a lot of vregs survive the greedy register allocator. Eventually this was displayed:

MachineFunctionProperties required by Prologue/Epilogue Insertion & Frame Finalization pass are not met by function autogen_SD13131.
Required properties: NoVRegs
Current properties: NoPHIs, TracksLiveness
MachineFunctionProperties check failed

My guess is that this is something that would never work. It seems to me that perhaps this combination of options should not be allowed, in case a >novice user happens to try it?

Diff Detail

Event Timeline

jonpa created this revision.May 15 2017, 1:23 AM
MatzeB edited edge metadata.May 15 2017, 9:40 AM

This seems like a case for report_fatal_error() rarther than assert()

qcolombet requested changes to this revision.May 15 2017, 9:42 AM
qcolombet added inline comments.
lib/CodeGen/TargetPassConfig.cpp
628

Agreed with Matthias, that should be a fatal error.

This revision now requires changes to proceed.May 15 2017, 9:42 AM
jonpa updated this revision to Diff 99106.May 15 2017, 11:53 PM
jonpa edited edge metadata.

assert() -> report_fatal_error()

MatzeB accepted this revision.May 16 2017, 11:23 AM

LGTM

qcolombet accepted this revision.May 16 2017, 1:39 PM
This revision is now accepted and ready to land.May 16 2017, 1:39 PM
jonpa closed this revision.May 17 2017, 12:50 AM

r303238