This is an archive of the discontinued LLVM Phabricator instance.

[mlir][LLVM] NFC - Remove createIndexConstant method
ClosedPublic

Authored by nicolasvasilache on Aug 1 2023, 11:28 PM.

Details

Summary

This revision removes the createIndexConstant method, which implicitly creates constants of the
getIndexType type and updates all uses to the more explicit createIndexAttrConstant which requires
an explicit Type parameter.

This is an NFC step towards entangling index type conversion in LLVM lowering.

The selection of which index type to use requires finer granularity than the existing
implementations which all rely on pass level flags and end up in mismatches, especially on GPUs
with multiple address spaces of different capacities.

This revision also includes an NFC fix to MemRefToLLVM.cpp that prevents a crash in cases where
an integer memory space cannot be derived for a MemRef.

Diff Detail

Event Timeline

Herald added a reviewer: dcaballe. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
nicolasvasilache requested review of this revision.Aug 1 2023, 11:28 PM
Herald added a project: Restricted Project. · View Herald Transcript
springerm accepted this revision.Aug 1 2023, 11:32 PM
This revision is now accepted and ready to land.Aug 1 2023, 11:32 PM
nicolasvasilache edited the summary of this revision. (Show Details)

Update.