[polly] r233501 - Strip constant factors from SCoP parameters

Tobias Grosser tobias at grosser.es
Thu Apr 9 07:33:55 PDT 2015


On 04/08/2015 07:22 PM, Johannes Doerfert wrote:
>
> On 04/08, Tobias Grosser wrote:
>> On 03/29/2015 10:45 PM, Johannes Doerfert wrote:
>>> Author: jdoerfert
>>> Date: Sun Mar 29 15:45:09 2015
>>> New Revision: 233501
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=233501&view=rev
>>> Log:
>>> Strip constant factors from SCoP parameters
>>>
>>>    This will strip the constant factor of a parameter befor we add it to
>>>    the SCoP. As a result the access functions are simplified, e.g., for
>>>    the attached test case.
>>
>> Hi Johannes,
>>
>> we just got https://llvm.org/bugs/show_bug.cgi?id=23160 reported and for me
>> it breaks in:
>>
>> 6  clang           0x00000000015ef059
>> llvm::ScalarEvolution::isSCEVable(llvm::Type*) const + 25
>> 7  clang           0x00000000015edb5f
>> llvm::ScalarEvolution::getEffectiveSCEVType(llvm::Type*) const + 47
>> 8  clang           0x00000000015edaef
>> llvm::ScalarEvolution::getConstant(llvm::Type*, unsigned long, bool) + 47
>> 9  LLVMPolly.so    0x00007f31e8ada55c
>> polly::extractConstantFactor(llvm::SCEV const*, llvm::ScalarEvolution&) + 60
>> 10 LLVMPolly.so    0x00007f31e8a6b3bf
>> polly::Scop::addParams(std::vector<llvm::SCEV const*,
>> std::allocator<llvm::SCEV const*> >) + 111
>> 11 LLVMPolly.so    0x00007f31e8a6b2e4
>> SCEVAffinator::getPwAff(polly::ScopStmt*, llvm::SCEV const*) + 116
>> 12 LLVMPolly.so    0x00007f31e8a6df3b
>> polly::MemoryAccess::MemoryAccess(polly::IRAccess const&,
>> llvm::Instruction*, polly::ScopStmt*, polly::ScopArrayInfo const*) + 603
>> 13 LLVMPolly.so    0x00007f31e8a6ed9f
>> polly::ScopStmt::buildAccesses(polly::TempScop&, llvm::BasicBlock*, bool) +
>> 383
>>
>> Could this be caused by your patch?
> This looks look the SCEV handed to extractConstantFactor is NULL (or
> more unlikely the ScalarEvolution reference is broken). Anyhow, if it
> crashes at getConstant it was broken before.
>  I can look into it tomorrow.

Sure, but don't feel obliged.

It seems besides this and another bug (only 32 bit), we can now compile 
ffmpeg without compile-time issues (thanks Jeremy!).

Cheers,
Tobias




More information about the llvm-commits mailing list