Skip to content

Conversation

@vchuravy
Copy link
Member

@vchuravy vchuravy commented Oct 1, 2023

Currently NFC.
The most interesting option is to disallow all libcalls,
or enable vectorization.

We could investigate:

  /// Return true if the function F has a vector equivalent with any
  /// vectorization factor.
  bool isFunctionVectorizable(StringRef F) const;
 
  /// Return the name of the equivalent of F, vectorized with factor VF. If no
  /// such mapping exists, return the empty string.
  StringRef getVectorizedFunction(StringRef F, const ElementCount &VF,
                                  bool Masked) const;

@vchuravy vchuravy requested a review from pchintalapudi October 1, 2023 22:09
@gbaraldi
Copy link
Member

gbaraldi commented Oct 2, 2023

Would this allow us to give back something like a vectorized sin?

Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems a little risky, since LLVM declares that compilation can be done repeatably (in llc or opt for example) with this derived only from the triple:

This class [TargetLibraryInfoImpl] constructs tables that hold the target library information and make it available. However, it is somewhat expensive to compute and only depends on the triple. So users typically interact with the TargetLibraryInfo wrapper below.

Could we propose some sort of Metadata feature for LLVM that would replace the current magic global behavior of the TLII with explicit data found in the Module IR?

@vchuravy
Copy link
Member Author

vchuravy commented Oct 7, 2023

Would this allow us to give back something like a vectorized sin?

Yes in theory, but we probably need a better mechanism than string matching.

This seems a little risky

This is what Clang does xD

@gbaraldi
Copy link
Member

Vectorized safepoints?

@vchuravy
Copy link
Member Author

On issue with interoducing GC.safepoint() in a loop is that it blocks loop vectorization. This still doesn't fix it, but I need to look into wat the vectorize yes for decision making here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants