Created attachment 21571 [details] Unreduced test case for opencollada compiler hang As reported in https://bugs.freebsd.org/236313, building the opencollada port (see also <https://github.com/KhronosGroup/OpenCOLLADA>) takes an excessive amount of compile time when -O2 is enabled. Bisection shows this increase in compile time was introduced by https://reviews.llvm.org/rL342578 ("[X86] Handle COPYs of physregs better (regalloc hints)"). I'm attaching the full original test case (8.9M .cpp file, ~231k lines) for now, since reducing it is rather time consuming.
Investigating.
I managed to finally reduce the test case -- please try https://reviews.llvm.org/D59201 and see if it helps.
Fixed in https://reviews.llvm.org/rL355854