[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

Eli Friedman eli.friedman at gmail.com
Wed Aug 29 14:00:43 PDT 2012


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.

-Eli



More information about the llvm-commits mailing list