[PATCH] D112466: [NVPTX] Drop memory references of LDG/LDU

Andrew Savonichev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 2 10:58:13 PDT 2022


asavonic added a comment.
Herald added subscribers: mattd, gchakrabarti.
Herald added a project: All.

Sorry, this got pushed back by other things, but I'd like to return to this conversation. I've uploaded a patch to add a simple AA that takes NVPTX address spaces into account and implements pointsToConstantMemory (D124787 <https://reviews.llvm.org/D124787>).  This patch should be useful on its own, but I'm no longer sure that it is enough to safely (performace-wise) add mayLoad to LDU/LDG instructions.

The problem is that AA::pointsToConstantMemory works with LLVM IR Value (MemoryLocation), and optimizations in CodeGen may not be able to use it or it is just not enabled yet. There are also cases where heuristics treat loads separately (BranchFolding, RegAllocScore), and it is not clear if we can change this and treat constant loads as regular instructions for all targets.

I'll go over these cases in a couple of days, but for now it seems like the current patch (drop memory references) is the safest option.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112466/new/

https://reviews.llvm.org/D112466



More information about the llvm-commits mailing list