[llvm-commits] [llvm] r162733 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGNodes.h include/llvm/Target/TargetSelectionDAG.td lib/CodeGen/SelectionDAG/SelectionDAG.cpp test/CodeGen/Hexagon/newvaluejump.ll test/CodeGen/Hexagon/newvaluestore.l

Hal Finkel hfinkel at anl.gov
Wed Aug 29 14:21:04 PDT 2012


On Wed, 29 Aug 2012 14:00:43 -0700
Eli Friedman <eli.friedman at gmail.com> wrote:

> On Wed, Aug 29, 2012 at 1:58 PM, Hal Finkel <hfinkel at anl.gov> wrote:
> > On Wed, 29 Aug 2012 13:52:05 -0700
> > Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
> >
> >>
> >> On Aug 29, 2012, at 11:45 AM, Eli Friedman <eli.friedman at gmail.com>
> >> wrote:
> >>
> >> >> +  unsigned Flags = MachineMemOperand::MOVolatile;
> >> >> +  if (Opcode != ISD::ATOMIC_STORE)
> >> >> +    Flags |= MachineMemOperand::MOLoad;
> >> >> +  if (Opcode != ISD::ATOMIC_LOAD)
> >> >> +    Flags |= MachineMemOperand::MOStore;
> >> >
> >> > I'm not sure this is safe; I suppose it depends on how exactly
> >> > "volatile" is defined, though.  Specifically, it's unsafe to
> >> > move an arbitrary load from after an "acquire" load to before it.
> >>
> >> OK, r162857 should bring us back to the old behavior.
> >>
> >> MachineInstr::isSafeToMove() now treats volatile and atomic loads
> >> as if they were 'stores'. Here, 'store' means a barrier for moving
> >> a load instruction.
> >
> > Should these semantics be documented somewhere in the language
> > reference?
> 
> We don't have a language reference for MachineInstrs.

I know ;) -- My thought was that if these semantics correspond directly
to the IR semantics, then they should appear in the language reference.

 -Hal

> 
> -Eli



-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list