mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-12 05:56:28 +00:00
Scalar: Ignore ConstantData in processAssumption
Assumptions on UndefValue and ConstantPointerNull aren't relevant to other users. Ignore them entirely to avoid wasting cycles walking through their (possibly extremely extensive (cross-module)) use-lists. It wasn't clear how to add a specific test for this, and it'll be covered anyway by an eventual patch that asserts when trying to access the use-list of an instance of ConstantData. llvm-svn: 282334
This commit is contained in:
parent
b94ad7ec1b
commit
1463b59de9
@ -297,6 +297,11 @@ bool AlignmentFromAssumptionsPass::processAssumption(CallInst *ACall) {
|
||||
if (!extractAlignmentInfo(ACall, AAPtr, AlignSCEV, OffSCEV))
|
||||
return false;
|
||||
|
||||
// Skip ConstantPointerNull and UndefValue. Assumptions on these shouldn't
|
||||
// affect other users.
|
||||
if (isa<ConstantData>(AAPtr))
|
||||
return false;
|
||||
|
||||
const SCEV *AASCEV = SE->getSCEV(AAPtr);
|
||||
|
||||
// Apply the assumption to all other users of the specified pointer.
|
||||
|
Loading…
Reference in New Issue
Block a user