HomePhabricator

[ValueTracking] Fix usage of DataLayout::getTypeStoreSize()

Authored by huihuiz on Mar 20 2020, 4:52 PM.

Description

[ValueTracking] Fix usage of DataLayout::getTypeStoreSize()

Summary:
DataLayout::getTypeStoreSize() returns TypeSize.

For cases where it can not be scalable vector (e.g., GlobalVariable),
explicitly call TypeSize::getFixedSize().

For cases where scalable property doesn't matter, (e.g., check for
zero-sized type), use TypeSize::isNonZero().

Reviewers: sdesmalen, efriedma, apazos, reames

Reviewed By: efriedma

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76454

Details

Committed
huihuizMar 20 2020, 4:52 PM
Reviewer
efriedma
Differential Revision
D76454: [ValueTracking] Fix usage of DataLayout::getTypeStoreSize()
Parents
rG0a5fbf30937a: Temporarily Revert "Create basic SBEnvironment class"
Branches
Unknown
Tags
Unknown