aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2020-02-13 15:52:32 -0500
committerMatt Arsenault <arsenm2@gmail.com>2020-03-24 19:33:33 -0400
commit39c55cef21b4ca9863edf82b6d9995fb1e28c37d (patch)
treeba47f9943ec1867a338502edd029948ec0f706e5 /clang/lib/Frontend/CompilerInvocation.cpp
parent46bb6613a31fd43b6d4485ce7e71a387dc22cbc7 (diff)
downloadllvm-39c55cef21b4ca9863edf82b6d9995fb1e28c37d.zip
llvm-39c55cef21b4ca9863edf82b6d9995fb1e28c37d.tar.gz
llvm-39c55cef21b4ca9863edf82b6d9995fb1e28c37d.tar.bz2
GlobalISel: Introduce bitcast legalize action
For some operations, the type is unimportant and only the number of bits matters. For example I don't want to treat <4 x s8> as a legal type, but I also don't want to decompose loads of this into smaller pieces to get legal register types. On AMDGPU in SelectionDAG, we legalize a number of operations (most notably load and store) by coercing all types to vectors of i32. For GlobalISel, I'm trying very hard to avoid doing this for every type, but I don't think this strategy can be completely avoided. I'm trying to avoid bitcasts for any legitimately legal type we can operate on, since the intervening bitcasts have proven to be a hassle. For loads, I think I can get away without ever casting the result type, and handling any arbitrary bitwidth during selection (I will eventually want new tablegen support to help with this, rather than having to add every possible type as legal). The unmerge required to do anything with the value should expand to the expected shifts. This is trickier for stores, since it would now require handling a wide array of truncates during selection which I don't want. Future potentially interesting case are for vector indexing, where sub-dword type should be indexed in s32 pieces.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions