This is an archive of the discontinued LLVM Phabricator instance.

[AllocaInst] Update `getAllocationSizeInBits` to return `TypeSize`.
ClosedPublic

Authored by fpetrogalli on Nov 24 2020, 3:37 AM.

Diff Detail

Event Timeline

fpetrogalli created this revision.Nov 24 2020, 3:37 AM
fpetrogalli requested review of this revision.Nov 24 2020, 3:37 AM
peterwaller-arm accepted this revision.Nov 25 2020, 7:04 AM

Tried to break it, wasn't able to. Looks straightforward.

Trivial nit.

llvm/unittests/IR/InstructionsTest.cpp
1382

Micro-nit: extra whitespace.

This revision is now accepted and ready to land.Nov 25 2020, 7:04 AM
sdesmalen added inline comments.Nov 26 2020, 8:32 AM
llvm/lib/Transforms/Coroutines/CoroFrame.cpp
589

This should maintain the original operator> and instead GetAllocaSize should return RetSize->getFixedSize().

llvm/unittests/IR/InstructionsTest.cpp
502

nit: unnecessary change.

fpetrogalli marked an inline comment as done.

I reverted the return type of the lambda function to be integral type instead of TypeSize.

fpetrogalli marked 2 inline comments as done.Nov 27 2020, 3:23 AM
fpetrogalli added inline comments.
llvm/lib/Transforms/Coroutines/CoroFrame.cpp
589

Good point! Done.

sdesmalen accepted this revision.Nov 27 2020, 8:21 AM

Thanks for the changes @fpetrogalli, LGTM.

This revision was automatically updated to reflect the committed changes.
fpetrogalli marked an inline comment as done.