[llvm] [DXIL][Analysis] Collect Function properties in Metadata Analysis (PR #105728)
S. Bharadwaj Yadavalli via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 08:03:29 PDT 2024
================
@@ -19,12 +20,16 @@ namespace llvm {
namespace dxil {
+struct FunctionProperties {
+ unsigned NumThreads[3];
+};
+
struct ModuleMetadataInfo {
VersionTuple DXILVersion{};
VersionTuple ShaderModelVersion{};
Triple::EnvironmentType ShaderStage = Triple::UnknownEnvironment;
VersionTuple ValidatorVersion{};
-
+ std::unordered_map<Function *, FunctionProperties> FunctionPropertyMap{};
----------------
bharadwajy wrote:
> Do we actually need to look up functions in a map for the function properties, or do we just need to be able to iterate through them? It might be nice to wire up the metadata analysis into DXILTranslateMetadata before adding more properties so that we can see how they'll be used.
Function lookup is employed in an implementation I have as a follow on PR that consumes this information in `DXILTranslateMetadata` pass - see [here](https://github.com/bharadwajy/llvm-project/blob/0da45710ee0bfbc505155ff61929b9c1ed83e806/llvm/lib/Target/DirectX/DXILTranslateMetadata.cpp#L69C4-L70C65).
https://github.com/llvm/llvm-project/pull/105728
More information about the llvm-commits
mailing list