[Mesa-dev] [PATCH 3/5] AMDGPU: Fix 4-space indentation

Vincent Lejeune vljn at ovi.com
Thu Nov 29 12:54:56 PST 2012


Reviewed-by: Vincent Lejeune <vljn at ovi.com>



----- Mail original -----
> De : Tom Stellard <tom at stellard.net>
> À : mesa-dev at lists.freedesktop.org
> Cc : Tom Stellard <thomas.stellard at amd.com>
> Envoyé le : Mercredi 28 novembre 2012 23h50
> Objet : [Mesa-dev] [PATCH 3/5] AMDGPU: Fix 4-space indentation
> 
> From: Tom Stellard <thomas.stellard at amd.com>
> 
> ---
> lib/Target/AMDGPU/AMDGPUCodeEmitter.h | 48 +++++++++---------
> lib/Target/AMDGPU/AMDILDeviceInfo.cpp | 96 +++++++++++++++++------------------
> lib/Target/AMDGPU/AMDILSIDevice.cpp   |  2 +-
> 3 files changed, 73 insertions(+), 73 deletions(-)
> 
> diff --git a/lib/Target/AMDGPU/AMDGPUCodeEmitter.h 
> b/lib/Target/AMDGPU/AMDGPUCodeEmitter.h
> index f1daec1..89886dd 100644
> --- a/lib/Target/AMDGPU/AMDGPUCodeEmitter.h
> +++ b/lib/Target/AMDGPU/AMDGPUCodeEmitter.h
> @@ -16,32 +16,32 @@
> 
> namespace llvm {
> 
> -  class AMDGPUCodeEmitter {
> -  public:
> -    uint64_t getBinaryCodeForInstr(const MachineInstr &MI) const;
> -    virtual uint64_t getMachineOpValue(const MachineInstr &MI,
> +class AMDGPUCodeEmitter {
> +public:
> +  uint64_t getBinaryCodeForInstr(const MachineInstr &MI) const;
> +  virtual uint64_t getMachineOpValue(const MachineInstr &MI,
>                                     const MachineOperand &MO) const { return 
> 0; }
> -    virtual unsigned GPR4AlignEncode(const MachineInstr  &MI,
> +  virtual unsigned GPR4AlignEncode(const MachineInstr  &MI,
>                                       unsigned OpNo) const {
> -      return 0;
> -    }
> -    virtual unsigned GPR2AlignEncode(const MachineInstr &MI,
> -                                     unsigned OpNo) const {
> -      return 0;
> -    }
> -    virtual uint64_t VOPPostEncode(const MachineInstr &MI,
> -                                   uint64_t Value) const {
> -      return Value;
> -    }
> -    virtual uint64_t i32LiteralEncode(const MachineInstr &MI,
> -                                      unsigned OpNo) const {
> -      return 0;
> -    }
> -    virtual uint32_t SMRDmemriEncode(const MachineInstr &MI, unsigned OpNo)
> -                                                                     const {
> -      return 0;
> -    }
> -  };
> +    return 0;
> +  }
> +  virtual unsigned GPR2AlignEncode(const MachineInstr &MI,
> +                                   unsigned OpNo) const {
> +    return 0;
> +  }
> +  virtual uint64_t VOPPostEncode(const MachineInstr &MI,
> +                                 uint64_t Value) const {
> +    return Value;
> +  }
> +  virtual uint64_t i32LiteralEncode(const MachineInstr &MI,
> +                                    unsigned OpNo) const {
> +    return 0;
> +  }
> +  virtual uint32_t SMRDmemriEncode(const MachineInstr &MI, unsigned OpNo)
> +                                                                   const {
> +    return 0;
> +  }
> +};
> 
> } // End namespace llvm
> 
> diff --git a/lib/Target/AMDGPU/AMDILDeviceInfo.cpp 
> b/lib/Target/AMDGPU/AMDILDeviceInfo.cpp
> index e110ddd..8c6c734 100644
> --- a/lib/Target/AMDGPU/AMDILDeviceInfo.cpp
> +++ b/lib/Target/AMDGPU/AMDILDeviceInfo.cpp
> @@ -16,78 +16,78 @@
> using namespace llvm;
> namespace llvm {
> namespace AMDGPUDeviceInfo {
> -    AMDGPUDevice*
> -getDeviceFromName(const std::string &deviceName, AMDGPUSubtarget *ptr,
> -                  bool is64bit, bool is64on32bit) {
> -    if (deviceName.c_str()[2] == '7') {
> -        switch (deviceName.c_str()[3]) {
> -            case '1':
> -                return new AMDGPU710Device(ptr);
> -            case '7':
> -                return new AMDGPU770Device(ptr);
> -            default:
> -                return new AMDGPU7XXDevice(ptr);
> -        };
> -    } else if (deviceName == "cypress") {
> +
> +AMDGPUDevice* getDeviceFromName(const std::string &deviceName,
> +                                AMDGPUSubtarget *ptr,
> +                                bool is64bit, bool is64on32bit) {
> +  if (deviceName.c_str()[2] == '7') {
> +    switch (deviceName.c_str()[3]) {
> +    case '1':
> +      return new AMDGPU710Device(ptr);
> +    case '7':
> +      return new AMDGPU770Device(ptr);
> +    default:
> +      return new AMDGPU7XXDevice(ptr);
> +    }
> +  } else if (deviceName == "cypress") {
> #if DEBUG
> -      assert(!is64bit && "This device does not support 64bit 
> pointers!");
> -      assert(!is64on32bit && "This device does not support 
> 64bit"
> +    assert(!is64bit && "This device does not support 64bit 
> pointers!");
> +    assert(!is64on32bit && "This device does not support 
> 64bit"
>            " on 32bit pointers!");
> #endif
> -        return new AMDGPUCypressDevice(ptr);
> -    } else if (deviceName == "juniper") {
> +    return new AMDGPUCypressDevice(ptr);
> +  } else if (deviceName == "juniper") {
> #if DEBUG
> -      assert(!is64bit && "This device does not support 64bit 
> pointers!");
> -      assert(!is64on32bit && "This device does not support 
> 64bit"
> +    assert(!is64bit && "This device does not support 64bit 
> pointers!");
> +    assert(!is64on32bit && "This device does not support 
> 64bit"
>            " on 32bit pointers!");
> #endif
> -        return new AMDGPUEvergreenDevice(ptr);
> -    } else if (deviceName == "redwood") {
> +    return new AMDGPUEvergreenDevice(ptr);
> +  } else if (deviceName == "redwood") {
> #if DEBUG
> -      assert(!is64bit && "This device does not support 64bit 
> pointers!");
> -      assert(!is64on32bit && "This device does not support 
> 64bit"
> +    assert(!is64bit && "This device does not support 64bit 
> pointers!");
> +    assert(!is64on32bit && "This device does not support 
> 64bit"
>            " on 32bit pointers!");
> #endif
> -      return new AMDGPURedwoodDevice(ptr);
> -    } else if (deviceName == "cedar") {
> +    return new AMDGPURedwoodDevice(ptr);
> +  } else if (deviceName == "cedar") {
> #if DEBUG
> -      assert(!is64bit && "This device does not support 64bit 
> pointers!");
> -      assert(!is64on32bit && "This device does not support 
> 64bit"
> +    assert(!is64bit && "This device does not support 64bit 
> pointers!");
> +    assert(!is64on32bit && "This device does not support 
> 64bit"
>            " on 32bit pointers!");
> #endif
> -        return new AMDGPUCedarDevice(ptr);
> -    } else if (deviceName == "barts"
> -      || deviceName == "turks") {
> +    return new AMDGPUCedarDevice(ptr);
> +  } else if (deviceName == "barts" || deviceName == 
> "turks") {
> #if DEBUG
> -      assert(!is64bit && "This device does not support 64bit 
> pointers!");
> -      assert(!is64on32bit && "This device does not support 
> 64bit"
> +    assert(!is64bit && "This device does not support 64bit 
> pointers!");
> +    assert(!is64on32bit && "This device does not support 
> 64bit"
>            " on 32bit pointers!");
> #endif
> -        return new AMDGPUNIDevice(ptr);
> -    } else if (deviceName == "cayman") {
> +    return new AMDGPUNIDevice(ptr);
> +  } else if (deviceName == "cayman") {
> #if DEBUG
> -      assert(!is64bit && "This device does not support 64bit 
> pointers!");
> -      assert(!is64on32bit && "This device does not support 
> 64bit"
> +    assert(!is64bit && "This device does not support 64bit 
> pointers!");
> +    assert(!is64on32bit && "This device does not support 
> 64bit"
>            " on 32bit pointers!");
> #endif
> -        return new AMDGPUCaymanDevice(ptr);
> -    } else if (deviceName == "caicos") {
> +    return new AMDGPUCaymanDevice(ptr);
> +  } else if (deviceName == "caicos") {
> #if DEBUG
> -      assert(!is64bit && "This device does not support 64bit 
> pointers!");
> -      assert(!is64on32bit && "This device does not support 
> 64bit"
> +    assert(!is64bit && "This device does not support 64bit 
> pointers!");
> +    assert(!is64on32bit && "This device does not support 
> 64bit"
>            " on 32bit pointers!");
> #endif
> -        return new AMDGPUNIDevice(ptr);
> -    } else if (deviceName == "SI") {
> -        return new AMDGPUSIDevice(ptr);
> -    } else {
> +    return new AMDGPUNIDevice(ptr);
> +  } else if (deviceName == "SI") {
> +    return new AMDGPUSIDevice(ptr);
> +  } else {
> #if DEBUG
> -      assert(!is64bit && "This device does not support 64bit 
> pointers!");
> -      assert(!is64on32bit && "This device does not support 
> 64bit"
> +    assert(!is64bit && "This device does not support 64bit 
> pointers!");
> +    assert(!is64on32bit && "This device does not support 
> 64bit"
>            " on 32bit pointers!");
> #endif
> -        return new AMDGPU7XXDevice(ptr);
> -    }
> +    return new AMDGPU7XXDevice(ptr);
> +  }
> }
> } // End namespace AMDGPUDeviceInfo
> } // End namespace llvm
> diff --git a/lib/Target/AMDGPU/AMDILSIDevice.cpp 
> b/lib/Target/AMDGPU/AMDILSIDevice.cpp
> index a8314c0..b0a87d7 100644
> --- a/lib/Target/AMDGPU/AMDILSIDevice.cpp
> +++ b/lib/Target/AMDGPU/AMDILSIDevice.cpp
> @@ -35,7 +35,7 @@ AMDGPUSIDevice::getGeneration() const {
> 
> std::string
> AMDGPUSIDevice::getDataLayout() const {
> -    return std::string("e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16"
> +  return std::string("e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16"
>        "-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:32:32"
>        "-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64"
>        "-v96:128:128-v128:128:128-v192:256:256-v256:256:256"
> -- 
> 1.7.11.4
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list