@@ -707,7 +707,6 @@ class YkIRWriter {
707
707
void serialiseLoadInst (LoadInst *I, FuncLowerCtxt &FLCtxt, unsigned BBIdx,
708
708
unsigned &InstIdx) {
709
709
// We don't yet support:
710
- // - volatile loads
711
710
// - atomic loads
712
711
// - loads from exotic address spaces
713
712
// - potentially misaligned loads
@@ -726,7 +725,7 @@ class YkIRWriter {
726
725
// Eventually we will have to encode the alignment of the load into our IR
727
726
// and have the trace code generator split up the loads where necessary.
728
727
// The same will have to be done for store instructions.
729
- if (I-> isVolatile () || (I->getOrdering () != AtomicOrdering::NotAtomic) ||
728
+ if ((I->getOrdering () != AtomicOrdering::NotAtomic) ||
730
729
(I->getPointerAddressSpace () != 0 ) ||
731
730
(I->getAlign () < DL.getTypeSizeInBits (I->getType ()) / 8 )) {
732
731
serialiseUnimplementedInstruction (I, FLCtxt, BBIdx, InstIdx);
@@ -739,6 +738,8 @@ class YkIRWriter {
739
738
serialiseOperand (I, FLCtxt, I->getPointerOperand ());
740
739
// type_idx:
741
740
OutStreamer.emitSizeT (typeIndex (I->getType ()));
741
+ // volatile:
742
+ OutStreamer.emitInt8 (I->isVolatile ());
742
743
743
744
FLCtxt.updateVLMap (I, InstIdx);
744
745
InstIdx++;
@@ -747,14 +748,13 @@ class YkIRWriter {
747
748
void serialiseStoreInst (StoreInst *I, FuncLowerCtxt &FLCtxt, unsigned BBIdx,
748
749
unsigned &InstIdx) {
749
750
// We don't yet support:
750
- // - volatile store
751
751
// - atomic store
752
752
// - stores into exotic address spaces
753
753
// - potentially misaligned stores
754
754
//
755
755
// See the comment in `serialiseLoadInst()` for context on misaligned memory
756
756
// accesses.
757
- if (I-> isVolatile () || (I->getOrdering () != AtomicOrdering::NotAtomic) ||
757
+ if ((I->getOrdering () != AtomicOrdering::NotAtomic) ||
758
758
(I->getPointerAddressSpace () != 0 ) ||
759
759
(I->getAlign () <
760
760
DL.getTypeSizeInBits (I->getValueOperand ()->getType ()) / 8 )) {
@@ -768,6 +768,8 @@ class YkIRWriter {
768
768
serialiseOperand (I, FLCtxt, I->getValueOperand ());
769
769
// ptr:
770
770
serialiseOperand (I, FLCtxt, I->getPointerOperand ());
771
+ // volatile:
772
+ OutStreamer.emitInt8 (I->isVolatile ());
771
773
772
774
InstIdx++;
773
775
}
0 commit comments