diff options
author | Guillaume Chatelet <gchatelet@google.com> | 2023-01-06 14:47:21 +0000 |
---|---|---|
committer | Guillaume Chatelet <gchatelet@google.com> | 2023-01-06 15:24:52 +0000 |
commit | dd56e1c92b0e6e6be249f2d2dd40894e0417223f (patch) | |
tree | 460301c3b9becc305417a0515fea5b5c128746e9 /llvm/lib/Analysis/Loads.cpp | |
parent | b8576086c78a5aebf056a8fc8cc716dfee40b72e (diff) | |
download | llvm-dd56e1c92b0e6e6be249f2d2dd40894e0417223f.zip llvm-dd56e1c92b0e6e6be249f2d2dd40894e0417223f.tar.gz llvm-dd56e1c92b0e6e6be249f2d2dd40894e0417223f.tar.bz2 |
[NFC] Only expose getXXXSize functions in TypeSize
Currently 'TypeSize' exposes two functions that serve the same purpose:
- getFixedSize / getFixedValue
- getKnownMinSize / getKnownMinValue
source : https://github.com/llvm/llvm-project/blob/bf82070ea465969e9ae86a31dfcbf94c2a7b4c4c/llvm/include/llvm/Support/TypeSize.h#L337-L338
This patch offers to remove one of the two and stick to a single function in the code base.
Differential Revision: https://reviews.llvm.org/D141134
Diffstat (limited to 'llvm/lib/Analysis/Loads.cpp')
-rw-r--r-- | llvm/lib/Analysis/Loads.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/Loads.cpp b/llvm/lib/Analysis/Loads.cpp index e108df8..325c8b2 100644 --- a/llvm/lib/Analysis/Loads.cpp +++ b/llvm/lib/Analysis/Loads.cpp @@ -408,7 +408,7 @@ bool llvm::isSafeToLoadUnconditionally(Value *V, Type *Ty, Align Alignment, TypeSize TySize = DL.getTypeStoreSize(Ty); if (TySize.isScalable()) return false; - APInt Size(DL.getIndexTypeSizeInBits(V->getType()), TySize.getFixedValue()); + APInt Size(DL.getIndexTypeSizeInBits(V->getType()), TySize.getFixedSize()); return isSafeToLoadUnconditionally(V, Alignment, Size, DL, ScanFrom, AC, DT, TLI); } |