mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-31 09:25:42 +00:00
Reapply address space patch after fixing an issue in MemCopyOptimizer.
Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset, e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100304 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -133,6 +133,13 @@ namespace llvm {
|
||||
return getAlignmentCst()->getZExtValue();
|
||||
}
|
||||
|
||||
ConstantInt *getVolatileCst() const {
|
||||
return cast<ConstantInt>(const_cast<Value*>(getOperand(5)));
|
||||
}
|
||||
bool isVolatile() const {
|
||||
return getVolatileCst()->getZExtValue() != 0;
|
||||
}
|
||||
|
||||
/// getDest - This is just like getRawDest, but it strips off any cast
|
||||
/// instructions that feed it, giving the original input. The returned
|
||||
/// value is guaranteed to be a pointer.
|
||||
@@ -155,7 +162,11 @@ namespace llvm {
|
||||
void setAlignment(Constant* A) {
|
||||
setOperand(4, A);
|
||||
}
|
||||
|
||||
|
||||
void setVolatile(Constant* V) {
|
||||
setOperand(5, V);
|
||||
}
|
||||
|
||||
const Type *getAlignmentType() const {
|
||||
return getOperand(4)->getType();
|
||||
}
|
||||
|
Reference in New Issue
Block a user