[llvm] r341031 - Revert "[SimplifyCFG] Common debug handling [NFC]"

Friedman, Eli via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 30 12:11:06 PDT 2018


The polly-aosp bot gave the following assertion:

clang++: 
/var/lib/buildbot/slaves/hexagon-build-03/aosp/llvm.src/lib/IR/Value.cpp:256: 
void llvm::Value::setNameImpl(const llvm::Twine &): Assertion 
`!getType()->isVoidTy() && "Cannot assign a name to void values!"' failed."

So I think the issue is just that it's calling setName() on a debug info 
intrinsic.

-Eli

On 8/30/2018 9:08 AM, Philip Reames via llvm-commits wrote:
> Thanks for handling this.
>
> I'm more than a bit confused as to how this led to a clang crash. I 
> can construct a scenario where this wasn't NFC, but the only result I 
> can come up with is improved debug info quality.
>
> For the record, I have no plans to investigate this further. This was 
> a minor cleanup and is not worth the time to me to invest in getting a 
> reproduction environment setup.  I'm simply going to abandon the patch.
>
> Philip
>
>
> On 08/30/2018 04:23 AM, Maxim Kuvyrkov wrote:
>> Martin,
>>
>> Thanks for reverting this.  I confirm that kernel build has returned 
>> to "all pass".
>>
>> -- 
>> Maxim Kuvyrkov
>> www.linaro.org
>>
>>
>>
>>> On Aug 30, 2018, at 11:06 AM, Martin Storsjo via llvm-commits 
>>> <llvm-commits at lists.llvm.org> wrote:
>>>
>>> Author: mstorsjo
>>> Date: Thu Aug 30 01:06:50 2018
>>> New Revision: 341031
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=341031&view=rev
>>> Log:
>>> Revert "[SimplifyCFG] Common debug handling [NFC]"
>>>
>>> This reverts commit r340997.
>>>
>>> This change turned out not to be NFC after all, but e.g. causes
>>> clang to crash when building the linux kernel for aarch64.
>>>
>>> Modified:
>>>     llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
>>>
>>> Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
>>> URL: 
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=341031&r1=341030&r2=341031&view=diff
>>> ============================================================================== 
>>>
>>> --- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
>>> +++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Thu Aug 30 
>>> 01:06:50 2018
>>> @@ -2694,6 +2694,8 @@ bool llvm::FoldBranchToCommonDest(Branch
>>>      // all instructions before Cond other than DbgInfoIntrinsic are 
>>> bonus
>>>      // instructions.
>>>      for (auto BonusInst = BB->begin(); Cond != &*BonusInst; 
>>> ++BonusInst) {
>>> +      if (isa<DbgInfoIntrinsic>(BonusInst))
>>> +        continue;
>>>        Instruction *NewBonusInst = BonusInst->clone();
>>>        RemapInstruction(NewBonusInst, VMap,
>>>                         RF_NoModuleLevelChanges | 
>>> RF_IgnoreMissingLocals);
>>> @@ -2821,6 +2823,12 @@ bool llvm::FoldBranchToCommonDest(Branch
>>>
>>>      // TODO: If BB is reachable from all paths through PredBlock, 
>>> then we
>>>      // could replace PBI's branch probabilities with BI's.
>>> +
>>> +    // Copy any debug value intrinsics into the end of PredBlock.
>>> +    for (Instruction &I : *BB)
>>> +      if (isa<DbgInfoIntrinsic>(I))
>>> +        I.clone()->insertBefore(PBI);
>>> +
>>>      return true;
>>>    }
>>>    return false;
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project



More information about the llvm-commits mailing list