Skip to content

Commit ad7a9d6

Browse files
authored
[CodeGen] Remove IsVolatile from DominatingValue<RValue>::save_type (#95165)
Prior to 84780af, the class didn't have any information about whether the saved value was volatile. This is NFC as far as I can tell.
1 parent 346f16d commit ad7a9d6

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

clang/lib/CodeGen/CGCleanup.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ DominatingValue<RValue>::saved_type::save(CodeGenFunction &CGF, RValue rv) {
4848

4949
assert(rv.isAggregate());
5050
Address V = rv.getAggregateAddress();
51-
return saved_type(
52-
DominatingValue<Address>::save(CGF, V), rv.isVolatileQualified(),
53-
DominatingValue<Address>::needsSaving(V) ? AggregateAddress
54-
: AggregateLiteral);
51+
return saved_type(DominatingValue<Address>::save(CGF, V),
52+
DominatingValue<Address>::needsSaving(V)
53+
? AggregateAddress
54+
: AggregateLiteral);
5555
}
5656

5757
/// Given a saved r-value produced by SaveRValue, perform the code
@@ -65,7 +65,7 @@ RValue DominatingValue<RValue>::saved_type::restore(CodeGenFunction &CGF) {
6565
case AggregateLiteral:
6666
case AggregateAddress:
6767
return RValue::getAggregate(
68-
DominatingValue<Address>::restore(CGF, AggregateAddr), IsVolatile);
68+
DominatingValue<Address>::restore(CGF, AggregateAddr));
6969
case ComplexAddress: {
7070
llvm::Value *real = DominatingLLVMValue::restore(CGF, Vals.first);
7171
llvm::Value *imag = DominatingLLVMValue::restore(CGF, Vals.second);

clang/lib/CodeGen/CodeGenFunction.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ template <> struct DominatingValue<RValue> {
221221
};
222222
LLVM_PREFERRED_TYPE(Kind)
223223
unsigned K : 3;
224-
unsigned IsVolatile : 1;
225224

226225
saved_type(DominatingLLVMValue::saved_type Val1, unsigned K)
227226
: Vals{Val1, DominatingLLVMValue::saved_type()}, K(K) {}
@@ -230,8 +229,7 @@ template <> struct DominatingValue<RValue> {
230229
DominatingLLVMValue::saved_type Val2)
231230
: Vals{Val1, Val2}, K(ComplexAddress) {}
232231

233-
saved_type(DominatingValue<Address>::saved_type AggregateAddr,
234-
bool IsVolatile, unsigned K)
232+
saved_type(DominatingValue<Address>::saved_type AggregateAddr, unsigned K)
235233
: AggregateAddr(AggregateAddr), K(K) {}
236234

237235
public:

0 commit comments

Comments
 (0)