New named metadata "dx.entryPoints" is added to save all entries.
Each entry is in format of
!{ptr to function, name, signature, resource table, extra}
For compute shader, the extra will save num of threads in format of {i32 x, i32 y, i32 z}
For library profile, an empty entry will be added to save the resource table for the library.
Signature and resource table metadata is not generated yet.
These function names don't conform to LLVM coding standards:
https://releases.llvm.org/8.0.0/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
Function names should be verb phrases that are imperative. I specifically removed this when I refactored the dx.valver change because it didn't conform to the coding standards and I felt that this abstraction made the code harder to read.
If we want to have a shorthand method for creating metadata, we should probably add new APIs to the IRBuilder, or other existing LLVM types rather than adding static methods like this.