Commit 14664766 authored by Justin Lebar's avatar Justin Lebar Committed by TensorFlower Gardener
Browse files

Improve function name sanitization, and add IrName helper.

* Rename SanitizeIrName to SanitizeFuntionName, because that's what it's
  for.  LLVM IR names can be basically anything, but function names have
  to be sanitized to meet the restrictions of the NVPTX backend.
  (Arguably this is a bug, but people have tried to fix it multiple
  times, and their changes keep getting stuck.)

* Make SanitizeFunctionName actually sanitize the given name.
  Previously, it got rid of some, but certainly not all, invalid chars.

* Add a new function, IrName, which lets you construct a name for use in
  LLVM IR from an HLO instruction and a suffix.

PiperOrigin-RevId: 168759752
parent 189b2b47
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment