[PATCH] D130131: [HLSL] CodeGen hlsl cbuffer/tbuffer.
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 12 18:13:51 PDT 2022
efriedma accepted this revision.
efriedma added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:112
+ // Replace.
+ GV->replaceAllUsesWith(GEP);
+ // Erase GV.
----------------
python3kgae wrote:
> efriedma wrote:
> > Messing with globals like this feels a little weird, but I guess it's fine if nothing actually tries to use the erased globals after this code runs. I'm a little concerned that someone might accidentally rearrange the relevant code in the future (CodeGenModule has a bunch of maps which aren't cleared before this code runs).
> These globals should not be in any map except Buf.Constants which is used here.
> If another map has these globals, we should remove them from the map.
> Cannot see any other map has these globals now.
Oh, I see. Probably not an issue in that case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130131/new/
https://reviews.llvm.org/D130131
More information about the cfe-commits
mailing list