[PATCH] D24463: AMDGPU: Rename glc operand type

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 09:27:19 PDT 2016


arsenm created this revision.
arsenm added reviewers: tstellarAMD, vpykhtin.
arsenm added a subscriber: llvm-commits.
Herald added subscribers: nhaehnle, wdng, arsenm.

While trying to add the glc bit to SMEM instructions on VI
with the new refactoring I ran into some kind of shadowing
problem for the glc operand when using the pseudoinstruction
as a multiclass parameter.
    
Everywhere that currently uses it defines the operand to have the same
name as its type, i.e. glc:$glc which works. For some reason now it
conflicts, and its up evaluating to the wrong thing. For the
real encoding classes,
    
let Inst{16} = !if(ps.has_glc, glc, ?); was not being evaluated
and still visible in the Inst initializer in the expanded td file.
In other cases I got a a different error about an illegal operand
where this was using { 0 } initializer from the bits<1> glc initializer
instead of evaluating it as false in the if.
    
For consistency all of the operand types should probably
be captialized to avoid conflicting with the variable names
unless somebody has a better idea of how to fix this.


https://reviews.llvm.org/D24463

Files:
  lib/Target/AMDGPU/FLATInstructions.td
  lib/Target/AMDGPU/MIMGInstructions.td
  lib/Target/AMDGPU/SIInstrInfo.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24463.71021.patch
Type: text/x-patch
Size: 9135 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160912/2db5f57b/attachment.bin>


More information about the llvm-commits mailing list