@@ -473,10 +473,10 @@ class MemInstr : public Instr {
473
473
474
474
class Alloc final : public MemInstr {
475
475
Value *size, *mul;
476
- unsigned align;
476
+ uint64_t align;
477
477
bool initially_dead = false ;
478
478
public:
479
- Alloc (Type &type, std::string &&name, Value &size, Value *mul, unsigned align)
479
+ Alloc (Type &type, std::string &&name, Value &size, Value *mul, uint64_t align)
480
480
: MemInstr(type, std::move(name)), size(&size), mul(mul), align(align) {}
481
481
482
482
Value& getSize () const { return *size; }
@@ -501,23 +501,23 @@ class Alloc final : public MemInstr {
501
501
502
502
class Malloc final : public MemInstr {
503
503
Value *ptr = nullptr , *size;
504
- unsigned align;
504
+ uint64_t align;
505
505
// Is this malloc (or equivalent operation, like new()) never returning
506
506
// null?
507
507
bool isNonNull = false ;
508
508
509
509
public:
510
510
Malloc (Type &type, std::string &&name, Value &size, bool isNonNull,
511
- unsigned align = 0 )
511
+ uint64_t align = 0 )
512
512
: MemInstr(type, std::move(name)), size(&size), align(align),
513
513
isNonNull (isNonNull) {}
514
514
515
515
Malloc (Type &type, std::string &&name, Value &ptr, Value &size,
516
- unsigned align = 0 )
516
+ uint64_t align = 0 )
517
517
: MemInstr(type, std::move(name)), ptr(&ptr), size(&size), align(align) {}
518
518
519
519
Value& getSize () const { return *size; }
520
- unsigned getAlign () const ;
520
+ uint64_t getAlign () const ;
521
521
bool isRealloc () const { return ptr != nullptr ; }
522
522
523
523
std::pair<uint64_t , unsigned > getMaxAllocSize () const override ;
@@ -537,15 +537,15 @@ class Malloc final : public MemInstr {
537
537
538
538
class Calloc final : public MemInstr {
539
539
Value *num, *size;
540
- unsigned align;
540
+ uint64_t align;
541
541
public:
542
542
Calloc (Type &type, std::string &&name, Value &num, Value &size,
543
- unsigned align = 0 )
543
+ uint64_t align = 0 )
544
544
: MemInstr(type, std::move(name)), num(&num), size(&size), align(align) {}
545
545
546
546
Value& getNum () const { return *num; }
547
547
Value& getSize () const { return *size; }
548
- unsigned getAlign () const ;
548
+ uint64_t getAlign () const ;
549
549
550
550
std::pair<uint64_t , unsigned > getMaxAllocSize () const override ;
551
551
uint64_t getMaxAccessSize () const override ;
@@ -635,13 +635,13 @@ class GEP final : public MemInstr {
635
635
636
636
class Load final : public MemInstr {
637
637
Value *ptr;
638
- unsigned align;
638
+ uint64_t align;
639
639
public:
640
- Load (Type &type, std::string &&name, Value &ptr, unsigned align)
640
+ Load (Type &type, std::string &&name, Value &ptr, uint64_t align)
641
641
: MemInstr(type, std::move(name)), ptr(&ptr), align(align) {}
642
642
643
643
Value& getPtr () const { return *ptr; }
644
- unsigned getAlign () const { return align; }
644
+ uint64_t getAlign () const { return align; }
645
645
646
646
std::pair<uint64_t , unsigned > getMaxAllocSize () const override ;
647
647
uint64_t getMaxAccessSize () const override ;
@@ -660,14 +660,14 @@ class Load final : public MemInstr {
660
660
661
661
class Store final : public MemInstr {
662
662
Value *ptr, *val;
663
- unsigned align;
663
+ uint64_t align;
664
664
public:
665
- Store (Value &ptr, Value &val, unsigned align)
665
+ Store (Value &ptr, Value &val, uint64_t align)
666
666
: MemInstr(Type::voidTy, " store" ), ptr(&ptr), val(&val), align(align) {}
667
667
668
668
Value& getValue () const { return *val; }
669
669
Value& getPtr () const { return *ptr; }
670
- unsigned getAlign () const { return align; }
670
+ uint64_t getAlign () const { return align; }
671
671
672
672
std::pair<uint64_t , unsigned > getMaxAllocSize () const override ;
673
673
uint64_t getMaxAccessSize () const override ;
@@ -687,14 +687,14 @@ class Store final : public MemInstr {
687
687
688
688
class Memset final : public MemInstr {
689
689
Value *ptr, *val, *bytes;
690
- unsigned align;
690
+ uint64_t align;
691
691
public:
692
- Memset (Value &ptr, Value &val, Value &bytes, unsigned align)
692
+ Memset (Value &ptr, Value &val, Value &bytes, uint64_t align)
693
693
: MemInstr(Type::voidTy, " memset" ), ptr(&ptr), val(&val), bytes(&bytes),
694
694
align (align) {}
695
695
696
696
Value& getBytes () const { return *bytes; }
697
- unsigned getAlign () const { return align; }
697
+ uint64_t getAlign () const { return align; }
698
698
699
699
std::pair<uint64_t , unsigned > getMaxAllocSize () const override ;
700
700
uint64_t getMaxAccessSize () const override ;
@@ -733,17 +733,17 @@ class FillPoison final : public MemInstr {
733
733
734
734
class Memcpy final : public MemInstr {
735
735
Value *dst, *src, *bytes;
736
- unsigned align_dst, align_src;
736
+ uint64_t align_dst, align_src;
737
737
bool move;
738
738
public:
739
739
Memcpy (Value &dst, Value &src, Value &bytes,
740
- unsigned align_dst, unsigned align_src, bool move)
740
+ uint64_t align_dst, uint64_t align_src, bool move)
741
741
: MemInstr(Type::voidTy, " memcpy" ), dst(&dst), src(&src), bytes(&bytes),
742
742
align_dst (align_dst), align_src(align_src), move(move) {}
743
743
744
744
Value& getBytes () const { return *bytes; }
745
- unsigned getSrcAlign () const { return align_src; }
746
- unsigned getDstAlign () const { return align_dst; }
745
+ uint64_t getSrcAlign () const { return align_src; }
746
+ uint64_t getDstAlign () const { return align_dst; }
747
747
748
748
std::pair<uint64_t , unsigned > getMaxAllocSize () const override ;
749
749
uint64_t getMaxAccessSize () const override ;
0 commit comments