[PATCH] D12920: Add TargetCustom type to PseudoSourceValue

Marcello Maggioni via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 17:44:47 PDT 2015


kariddi created this revision.
kariddi added a subscriber: llvm-commits.

PseudoSourceValue can be used to attach a target specific value for "well behaved" side-effects lowered from target specific intrinsics.
This is useful whenever there is not an LLVM IR Value around when representing such "well behaved" side-effected operations in backends by attaching a MachineMemOperand with a custom PseudoSourceValue as this makes the scheduler not treating them as "GlobalMemoryObjects" which triggers a logic that makes the operation act like a barrier in the Schedule DAG.

This patch adds another Kind to the PseudoSourceValue object which is "TargetCustom". It indicates a type of PseudoSourceValue that has a target specific meaning (aka. LLVM shouldn't assume any specific usage for such a PSV)

http://reviews.llvm.org/D12920

Files:
  include/llvm/CodeGen/PseudoSourceValue.h

Index: include/llvm/CodeGen/PseudoSourceValue.h
===================================================================
--- include/llvm/CodeGen/PseudoSourceValue.h
+++ include/llvm/CodeGen/PseudoSourceValue.h
@@ -40,7 +40,8 @@
     ConstantPool,
     FixedStack,
     GlobalValueCallEntry,
-    ExternalSymbolCallEntry
+    ExternalSymbolCallEntry,
+    TargetCustom
   };
 
 private:
@@ -63,6 +64,7 @@
   bool isGOT() const { return Kind == GOT; }
   bool isConstantPool() const { return Kind == ConstantPool; }
   bool isJumpTable() const { return Kind == JumpTable; }
+  bool isTargetCustom() const { return Kind == TargetCustom; }
 
   /// Test whether the memory pointed to by this PseudoSourceValue has a
   /// constant value.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12920.34952.patch
Type: text/x-patch
Size: 731 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150917/0faa9209/attachment.bin>


More information about the llvm-commits mailing list