[LocalStackSlotAllocation] Minor simplifications. NFC
authorCraig Topper <craig.topper@sifive.com>
Mon, 9 Jan 2023 17:45:22 +0000 (09:45 -0800)
committerCraig Topper <craig.topper@sifive.com>
Mon, 9 Jan 2023 17:45:22 +0000 (09:45 -0800)
commit1153313c334aa0ebe40b26593bd689a779ecaa23
tree9bb4fdd185a54eb5f852ec9833d50cd8afac463c
parentb37758356a39bca8bed3d4e83169254b124ac2df
[LocalStackSlotAllocation] Minor simplifications. NFC

Instead of maintaining a separate valid flag for BaseReg, Use
BaseReg.isValid(). I think this is left over from an older
implementation that maintained a vector of base registers.

The other change is not do a speculative assignment to BaseOffset
that needs to be reverted. Only commit it after we do the check.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D141153
llvm/lib/CodeGen/LocalStackSlotAllocation.cpp