llvm-6502/lib
Chandler Carruth 10cd8098a7 [x86] Teach the instruction lowering to add comments describing constant
pool data being loaded into a vector register.

The comments take the form of:

  # ymm0 = [a,b,c,d,...]
  # xmm1 = <x,y,z...>

The []s are used for generic sequential data and the <>s are used for
specifically ConstantVector loads. Undef elements are printed as the
letter 'u', integers in decimal, and floating point values as floating
point values. Suggestions on improving the formatting or other aspects
of the display are very welcome.

My primary use case for this is to be able to FileCheck test masks
passed to vector shuffle instructions in-register. It isn't fantastic
for that (no decoding special zeroing semantics or other tricks), but it
at least puts the mask onto an instruction line that could reasonably be
checked. I've updated many of the new vector shuffle lowering tests to
leverage this in their test cases so that we're actually checking the
shuffle masks remain as expected.

Before implementing this, I tried a *bunch* of different approaches.
I looked into teaching the MCInstLower code to scan up the basic block
and find a definition of a register used in a shuffle instruction and
then decode that, but this seems incredibly brittle and complex.
I talked to Hal a lot about the "right" way to do this: attach the raw
shuffle mask to the instruction itself in some form of unencoded
operands, and then use that to emit the comments. I still think that's
the optimal solution here, but it proved to be beyond what I'm up for
here. In particular, it seems likely best done by completing the
plumbing of metadata through these layers and attaching the shuffle mask
in metadata which could have fully automatic dropping when encoding an
actual instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218377 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-24 09:39:41 +00:00
..
Analysis Add two thresholds lvi-overdefined-BB-threshold and lvi-overdefined-threshold 2014-09-22 02:23:05 +00:00
AsmParser
Bitcode Do not destroy external linkage when deleting function body 2014-09-23 12:54:19 +00:00
CodeGen Clear PreferredExtendType for in each function-specific state FunctionLoweringInfo. 2014-09-24 03:22:56 +00:00
DebugInfo [dwarfdump] Dump full filenames as DW_AT_(decl|call)_file attribute values 2014-09-22 12:36:04 +00:00
ExecutionEngine [MCJIT] Fix some more RuntimeDyld debugging output format specifiers. 2014-09-23 19:20:57 +00:00
IR DIBuilder: Delete dead code, NFC 2014-09-19 23:17:58 +00:00
IRReader
LineEditor
Linker
LTO
MC Downgrade DWARF2 section limit error to a warning 2014-09-22 10:45:16 +00:00
Object Converting object's error_category to a ManagedStatic to avoid static constructors and destructors. 2014-09-19 22:09:18 +00:00
Option
ProfileData llvm-cov: Allow creating CoverageMappings from filenames 2014-09-20 17:19:52 +00:00
Support Windows/Host.inc: Reformat the header to fit 80-col. 2014-09-24 04:45:14 +00:00
TableGen
Target [x86] Teach the instruction lowering to add comments describing constant 2014-09-24 09:39:41 +00:00
Transforms Allow BB duplication threshold to be adjusted through JumpThreading's ctor 2014-09-24 04:59:06 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile