[PATCH] Add infrastructure for support of multiple memory constraints.

Daniel Sanders daniel.sanders at imgtec.com
Mon Mar 9 08:55:18 PDT 2015


The operand flag word for ISD::INLINEASM nodes now contains a 15-bit
memory constraint ID when the operand kind is Kind_Mem. This constraint
ID is a numeric equivalent to the constraint code string and is converted
with a target specific hook in TargetLowering.

This patch maps all memory constraints to InlineAsm::Constraint_m so there
is no functional change at this point. It just proves that using these
previously unused bits in the encoding of the flag word doesn't break anything.

The next patch will make each target preserve the current mapping of
everything to Constraint_m for itself while changing the target independent
implementation of the hook to return Constraint_Unknown appropriately. Each
target will then be adapted in separate patches to use appropriate Constraint_*
values.

Depends on D8168. Without it, MSP430 will begin crashing as the new flag
word values no longer fit in the MVT it uses for pointers (i16).

http://reviews.llvm.org/D8171

Files:
  include/llvm/CodeGen/SelectionDAGISel.h
  include/llvm/IR/InlineAsm.h
  include/llvm/Target/TargetLowering.h
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
  lib/Target/ARM/ARMISelDAGToDAG.cpp
  lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
  lib/Target/MSP430/MSP430ISelDAGToDAG.cpp
  lib/Target/Mips/MipsISelDAGToDAG.cpp
  lib/Target/Mips/MipsISelDAGToDAG.h
  lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
  lib/Target/NVPTX/NVPTXISelDAGToDAG.h
  lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  lib/Target/Sparc/SparcISelDAGToDAG.cpp
  lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
  lib/Target/X86/X86ISelDAGToDAG.cpp
  lib/Target/XCore/XCoreISelDAGToDAG.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8171.21490.patch
Type: text/x-patch
Size: 20367 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150309/027ebb3e/attachment.bin>


More information about the llvm-commits mailing list