[llvm] r279625 - Create subranges for new intervals resulting from live interval splitting

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 25 05:51:48 PDT 2016


Hi Michel,
Thank you for the testcases. I'm working on a fix.

-Krzysztof

On 8/25/2016 1:52 AM, Michel Dänzer wrote:
>
> Hi Krzysztof,
>
>
> On 24/08/16 10:37 PM, Krzysztof Parzyszek via llvm-commits wrote:
>> Author: kparzysz
>> Date: Wed Aug 24 08:37:55 2016
>> New Revision: 279625
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=279625&view=rev
>> Log:
>> Create subranges for new intervals resulting from live interval splitting
>
> This change broke several piglit tests using the Mesa radeonsi driver.
> I'm attaching two examples of failing LLVM IR, below is the
> corresponding output from llc:
>
>
> llc: ../lib/CodeGen/RegisterCoalescer.cpp:2021: {anonymous}::JoinVals::ConflictResolution {anonymous}::JoinVals::analyzeValue(unsigned int, {anonymous}::JoinVals&): Assertion `DefMI != nullptr' failed.
> #0 0x00007f147fdf9d78 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/Support/Unix/Signals.inc:404:0
> #1 0x00007f147fdf7bbe llvm::sys::RunSignalHandlers() /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/Support/Signals.cpp:45:0
> #2 0x00007f147fdf7d09 SignalHandler(int) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/Support/Unix/Signals.inc:258:0
> #3 0x00007f147f6daed0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10ed0)
> #4 0x00007f147eaad1c8 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x331c8)
> #5 0x00007f147eaae64a abort (/lib/x86_64-linux-gnu/libc.so.6+0x3464a)
> #6 0x00007f147eaa6107 (/lib/x86_64-linux-gnu/libc.so.6+0x2c107)
> #7 0x00007f147eaa61b2 (/lib/x86_64-linux-gnu/libc.so.6+0x2c1b2)
> #8 0x00007f14801584bf analyzeValue /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:2112:0
> #9 0x00007f14801584bf (anonymous namespace)::JoinVals::computeAssignment(unsigned int, (anonymous namespace)::JoinVals&) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:2233:0
> #10 0x00007f14801585b6 begin /home/daenzer/src/llvm-git/llvm/build-amd64/../include/llvm/ADT/SmallVector.h:115:0
> #11 0x00007f14801585b6 size /home/daenzer/src/llvm-git/llvm/build-amd64/../include/llvm/ADT/SmallVector.h:132:0
> #12 0x00007f14801585b6 operator[] /home/daenzer/src/llvm-git/llvm/build-amd64/../include/llvm/ADT/SmallVector.h:145:0
> #13 0x00007f14801585b6 (anonymous namespace)::JoinVals::mapValues((anonymous namespace)::JoinVals&) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:2269:0
> #14 0x00007f148015b8e1 joinSubRegRanges /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:2657:0
> #15 0x00007f148015b8e1 (anonymous namespace)::RegisterCoalescer::mergeSubRangeInto(llvm::LiveInterval&, llvm::LiveRange const&, unsigned int, llvm::CoalescerPair&) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:2728:0
> #16 0x00007f148015f9d9 llvm::LiveInterval::SingleLinkedListIterator<llvm::LiveInterval::SubRange>::operator++() /home/daenzer/src/llvm-git/llvm/build-amd64/../include/llvm/CodeGen/LiveInterval.h:673:0
> #17 0x00007f148015f9d9 joinVirtRegs /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:2792:0
> #18 0x00007f148015f9d9 joinIntervals /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:2844:0
> #19 0x00007f148015f9d9 (anonymous namespace)::RegisterCoalescer::joinCopy(llvm::MachineInstr*, bool&) [clone .constprop.292] /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:1468:0
> #20 0x00007f1480161d8f (anonymous namespace)::RegisterCoalescer::copyCoalesceWorkList(llvm::MutableArrayRef<llvm::MachineInstr*>) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:2916:0
> #21 0x00007f1480161e0e llvm::SmallVectorTemplateCommon<llvm::MachineInstr*, void>::begin() const /home/daenzer/src/llvm-git/llvm/build-amd64/../include/llvm/ADT/SmallVector.h:115:0
> #22 0x00007f1480161e0e llvm::SmallVectorTemplateCommon<llvm::MachineInstr*, void>::size() const /home/daenzer/src/llvm-git/llvm/build-amd64/../include/llvm/ADT/SmallVector.h:132:0
> #23 0x00007f1480161e0e (anonymous namespace)::RegisterCoalescer::coalesceLocals() /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:3040:0
> #24 0x00007f1480163014 joinAllIntervals /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:3070:0
> #25 0x00007f1480163014 (anonymous namespace)::RegisterCoalescer::runOnMachineFunction(llvm::MachineFunction&) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:3115:0
> #26 0x00007f1480060b24 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/MachineFunctionPass.cpp:62:0
> #27 0x00007f147fed1c49 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/IR/LegacyPassManager.cpp:1522:0
> #28 0x00007f147fed1cec llvm::FPPassManager::runOnModule(llvm::Module&) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/IR/LegacyPassManager.cpp:1543:0
> #29 0x00007f147fed234c runOnModule /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/IR/LegacyPassManager.cpp:1599:0
> #30 0x00007f147fed234c llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/IR/LegacyPassManager.cpp:1702:0
> #31 0x0000000000416815 compileModule(char**, llvm::LLVMContext&) /home/daenzer/src/llvm-git/llvm/build-amd64/../tools/llc/llc.cpp:508:0
> #32 0x000000000040a968 main /home/daenzer/src/llvm-git/llvm/build-amd64/../tools/llc/llc.cpp:273:0
> #33 0x00007f147ea9a730 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20730)
> #34 0x000000000040a9d9 _start (/home/daenzer/src/llvm-git/llvm/build-amd64/bin/llc+0x40a9d9)
> Stack dump:
> 0.      Program arguments: /home/daenzer/src/llvm-git/llvm/build-amd64/bin/llc -march=amdgcn -mcpu=kaveri
> 1.      Running pass 'Function Pass Manager' on module '<stdin>'.
> 2.      Running pass 'Simple Register Coalescing' on function '@main'
>
>
>
>
> ** Couldn't join subrange!
>
> UNREACHABLE executed at ../lib/CodeGen/RegisterCoalescer.cpp:2666!
> #0 0x00007f7702839d78 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/Support/Unix/Signals.inc:404:0
> #1 0x00007f7702837bbe llvm::sys::RunSignalHandlers() /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/Support/Signals.cpp:45:0
> #2 0x00007f7702837d09 SignalHandler(int) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/Support/Unix/Signals.inc:258:0
> #3 0x00007f770211aed0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10ed0)
> #4 0x00007f77014ed1c8 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x331c8)
> #5 0x00007f77014ee64a abort (/lib/x86_64-linux-gnu/libc.so.6+0x3464a)
> #6 0x00007f77027d7bc6 (/home/daenzer/src/llvm-git/llvm/build-amd64/bin/../lib/libLLVM-4.0svn.so+0x4adbc6)
> #7 0x00007f7702b9bcde joinSubRegRanges /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:2666:0
> #8 0x00007f7702b9bcde (anonymous namespace)::RegisterCoalescer::mergeSubRangeInto(llvm::LiveInterval&, llvm::LiveRange const&, unsigned int, llvm::CoalescerPair&) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:2728:0
> #9 0x00007f7702b9f9d9 llvm::LiveInterval::SingleLinkedListIterator<llvm::LiveInterval::SubRange>::operator++() /home/daenzer/src/llvm-git/llvm/build-amd64/../include/llvm/CodeGen/LiveInterval.h:673:0
> #10 0x00007f7702b9f9d9 joinVirtRegs /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:2792:0
> #11 0x00007f7702b9f9d9 joinIntervals /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:2844:0
> #12 0x00007f7702b9f9d9 (anonymous namespace)::RegisterCoalescer::joinCopy(llvm::MachineInstr*, bool&) [clone .constprop.292] /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:1468:0
> #13 0x00007f7702ba1d8f (anonymous namespace)::RegisterCoalescer::copyCoalesceWorkList(llvm::MutableArrayRef<llvm::MachineInstr*>) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:2916:0
> #14 0x00007f7702ba3031 joinAllIntervals /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:3074:0
> #15 0x00007f7702ba3031 (anonymous namespace)::RegisterCoalescer::runOnMachineFunction(llvm::MachineFunction&) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/RegisterCoalescer.cpp:3115:0
> #16 0x00007f7702aa0b24 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/CodeGen/MachineFunctionPass.cpp:62:0
> #17 0x00007f7702911c49 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/IR/LegacyPassManager.cpp:1522:0
> #18 0x00007f7702911cec llvm::FPPassManager::runOnModule(llvm::Module&) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/IR/LegacyPassManager.cpp:1543:0
> #19 0x00007f770291234c runOnModule /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/IR/LegacyPassManager.cpp:1599:0
> #20 0x00007f770291234c llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/daenzer/src/llvm-git/llvm/build-amd64/../lib/IR/LegacyPassManager.cpp:1702:0
> #21 0x0000000000416815 compileModule(char**, llvm::LLVMContext&) /home/daenzer/src/llvm-git/llvm/build-amd64/../tools/llc/llc.cpp:508:0
> #22 0x000000000040a968 main /home/daenzer/src/llvm-git/llvm/build-amd64/../tools/llc/llc.cpp:273:0
> #23 0x00007f77014da730 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20730)
> #24 0x000000000040a9d9 _start (/home/daenzer/src/llvm-git/llvm/build-amd64/bin/llc+0x40a9d9)
> Stack dump:
> 0.      Program arguments: /home/daenzer/src/llvm-git/llvm/build-amd64/bin/llc -march=amdgcn -mcpu=kaveri
> 1.      Running pass 'Function Pass Manager' on module '<stdin>'.
> 2.      Running pass 'Simple Register Coalescing' on function '@main'
>
>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation


More information about the llvm-commits mailing list