[PATCH] D157273: [GlobalISel] Add dead flags to implicit defs in ISel
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 8 04:17:22 PDT 2023
arsenm accepted this revision.
arsenm added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutor.h:335
/// - RegNum - The register to add
+ /// - Dead - Whether this is a dead def.
GIR_AddImplicitDef,
----------------
Pierre-vh wrote:
> arsenm wrote:
> > arsenm wrote:
> > > Can just make the flag value?
> > actually you can compact the two into one field, register is 32-bits and the flags are 16 I think
> I think compacting it is more trouble than it's worth, and it'd make this opcode an outlier - e.g. `AddTempRegister` doesn't compact, `AddTempSubRegister` doesn't, etc.
>
> We should just look into making this a variable-length encoded array at some point, but it's quite a bit of work. Probably not worth it until we get actual performance numbers.
>
> I wonder if we ever make use of the upper 32 bits though, maybe the table should always be 32 bits, with an option to variable-length-encode bigger values.
could change all these easy cases at once
================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h:950
assert(OutMIs[InsnID] && "Attempted to add to undefined instruction");
- OutMIs[InsnID].addDef(RegNum, RegState::Implicit);
+ Flags |= RegState::Implicit;
+ OutMIs[InsnID].addDef(RegNum, Flags);
----------------
This could have just been in the table
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157273/new/
https://reviews.llvm.org/D157273
More information about the llvm-commits
mailing list