Page MenuHomePhabricator

Add custom type for PseudoSourceValue

Authored by kariddi on Oct 8 2015, 2:55 PM.



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).

It supports the possibility of having many different kinds of "TargetCustom" PseudoSourceValues.

We had a discussion about if this was valuable or not (in particular because there was a believe that PSV were going away sooner or later) but seems like they are not going anywhere and I think they are useful backend side.

It is not clear the interaction of this with MIRParser (do we need a target hook to parse these?) and I would like a comment from Alex about that :)

Diff Detail


Event Timeline

kariddi updated this revision to Diff 36896.Oct 8 2015, 2:55 PM
kariddi retitled this revision from to Add custom type for PseudoSourceValue.
kariddi updated this object.
kariddi added reviewers: arsenm, arphaman, hfinkel.
kariddi added a subscriber: llvm-commits.
arsenm accepted this revision.Dec 18 2015, 5:48 PM
arsenm edited edge metadata.


This revision is now accepted and ready to land.Dec 18 2015, 5:48 PM

Looks like patch was not committed.

This revision was automatically updated to reflect the committed changes.