[PATCH] [RFC]TILE-Gx: updated patch for final review

Jiong WANG wong.kwongyuan.llvm at gmail.com
Mon Mar 25 22:18:23 PDT 2013


  Hi Sean,

    thanks for your time to review.

    fixed all these and similar issues found in the whole TILE-Gx backend.

    1. use std::advance for iterator forward a fixed length
    2. do not align '='
    3. for the following code shap

      if (LocVT == MVT::i32
         || LocVT == MVT::f32) {

     if they fix in 80 columns in one line, then do not break.

     4. always use array_lengthof instead of "size array / size item'
     5. use assert instead of "if" + "llvm_unreachable"
     6. use early exit if we can
     7. rename enumeration name according to llvm coding style doc.
     8. promote variable evaluation in loop body, change code shape like:

      for (int i; i < XXX.size(); i++)  to
      for (int i, int e = XXX.size(); i< e; i++)

     9. I used llvm-clang to reformat  most of the .h and .cpp which are TILE-Gx private, the format looks better.

    10. re-run regression and test-suite to make sure there is no functional change.

  Hi All,

    attachment is the updated patch.

    please review.

    thanks.

  ---
  Regards,
  Jiong
  Tilera Corporation.

http://llvm-reviews.chandlerc.com/D573

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D573?vs=1385&id=1396#toc

Files:
  include/clang/Basic/TargetInfo.h
  lib/AST/ASTContext.cpp
  lib/Basic/Targets.cpp
  lib/CodeGen/TargetInfo.cpp
  lib/Driver/ToolChains.cpp
  lib/Driver/Tools.cpp
  lib/Driver/Tools.h
  autoconf/configure.ac
  configure
  include/llvm/ADT/Triple.h
  include/llvm/MC/MCExpr.h
  include/llvm/Object/ELF.h
  include/llvm/Object/RelocVisitor.h
  include/llvm/Support/ELF.h
  lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
  lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
  lib/MC/MCExpr.cpp
  lib/Support/Triple.cpp
  lib/Target/LLVMBuild.txt
  lib/Target/Tile/AsmParser/CMakeLists.txt
  lib/Target/Tile/AsmParser/LLVMBuild.txt
  lib/Target/Tile/AsmParser/Makefile
  lib/Target/Tile/AsmParser/TileAsmParser.cpp
  lib/Target/Tile/CMakeLists.txt
  lib/Target/Tile/InstPrinter/CMakeLists.txt
  lib/Target/Tile/InstPrinter/LLVMBuild.txt
  lib/Target/Tile/InstPrinter/Makefile
  lib/Target/Tile/InstPrinter/TileInstPrinter.cpp
  lib/Target/Tile/InstPrinter/TileInstPrinter.h
  lib/Target/Tile/LLVMBuild.txt
  lib/Target/Tile/MCTargetDesc/CMakeLists.txt
  lib/Target/Tile/MCTargetDesc/LLVMBuild.txt
  lib/Target/Tile/MCTargetDesc/Makefile
  lib/Target/Tile/MCTargetDesc/TileAsmBackend.cpp
  lib/Target/Tile/MCTargetDesc/TileBaseInfo.h
  lib/Target/Tile/MCTargetDesc/TileELFObjectWriter.cpp
  lib/Target/Tile/MCTargetDesc/TileFixupKinds.h
  lib/Target/Tile/MCTargetDesc/TileMCAsmInfo.cpp
  lib/Target/Tile/MCTargetDesc/TileMCAsmInfo.h
  lib/Target/Tile/MCTargetDesc/TileMCCodeEmitter.cpp
  lib/Target/Tile/MCTargetDesc/TileMCTargetDesc.cpp
  lib/Target/Tile/MCTargetDesc/TileMCTargetDesc.h
  lib/Target/Tile/Makefile
  lib/Target/Tile/TargetInfo/CMakeLists.txt
  lib/Target/Tile/TargetInfo/LLVMBuild.txt
  lib/Target/Tile/TargetInfo/Makefile
  lib/Target/Tile/TargetInfo/TileTargetInfo.cpp
  lib/Target/Tile/Tile.h
  lib/Target/Tile/Tile.td
  lib/Target/Tile/TileAsmPrinter.cpp
  lib/Target/Tile/TileAsmPrinter.h
  lib/Target/Tile/TileCallingConv.h
  lib/Target/Tile/TileCallingConv.td
  lib/Target/Tile/TileExpandPseudo.cpp
  lib/Target/Tile/TileFrameLowering.cpp
  lib/Target/Tile/TileFrameLowering.h
  lib/Target/Tile/TileISelDAGToDAG.cpp
  lib/Target/Tile/TileISelLowering.cpp
  lib/Target/Tile/TileISelLowering.h
  lib/Target/Tile/TileInstrFormats.td
  lib/Target/Tile/TileInstrInfo.cpp
  lib/Target/Tile/TileInstrInfo.h
  lib/Target/Tile/TileInstrInfo.td
  lib/Target/Tile/TileMCInst.h
  lib/Target/Tile/TileMCInstLower.cpp
  lib/Target/Tile/TileMCInstLower.h
  lib/Target/Tile/TileMachineFunction.cpp
  lib/Target/Tile/TileMachineFunction.h
  lib/Target/Tile/TileRegisterInfo.cpp
  lib/Target/Tile/TileRegisterInfo.h
  lib/Target/Tile/TileRegisterInfo.td
  lib/Target/Tile/TileRelocations.h
  lib/Target/Tile/TileSchedule.td
  lib/Target/Tile/TileSelectionDAGInfo.cpp
  lib/Target/Tile/TileSelectionDAGInfo.h
  lib/Target/Tile/TileSubtarget.cpp
  lib/Target/Tile/TileSubtarget.h
  lib/Target/Tile/TileTargetMachine.cpp
  lib/Target/Tile/TileTargetMachine.h
  lib/Target/Tile/TileVLIWPacketizer.cpp
  test/CodeGen/Tile/alloca.ll
  test/CodeGen/Tile/args.ll
  test/CodeGen/Tile/atomic.ll
  test/CodeGen/Tile/bswap.ll
  test/CodeGen/Tile/ctlz.ll
  test/CodeGen/Tile/ctpop.ll
  test/CodeGen/Tile/cttz.ll
  test/CodeGen/Tile/divrem.ll
  test/CodeGen/Tile/fcmp.ll
  test/CodeGen/Tile/fdiv.ll
  test/CodeGen/Tile/fmul.ll
  test/CodeGen/Tile/frame-address.ll
  test/CodeGen/Tile/global-address.ll
  test/CodeGen/Tile/imm.ll
  test/CodeGen/Tile/lit.local.cfg
  test/CodeGen/Tile/mul.ll
  test/CodeGen/Tile/return-address.ll
  test/CodeGen/Tile/select.ll
  test/CodeGen/Tile/struct_args.ll
  test/CodeGen/Tile/switch-table.ll
  test/CodeGen/Tile/tls-models.ll
  test/CodeGen/Tile/tls.ll
  test/ExecutionEngine/MCJIT/lit.local.cfg
  test/MC/Tile/basic-tilegx-instructions.s
  test/MC/Tile/lit.local.cfg
  test/MC/Tile/pic-symbol.ll
  test/MC/Tile/tilegx-bundle.s
  test/lit.cfg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D573.2.patch
Type: text/x-patch
Size: 490781 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130325/398e809d/attachment.bin>


More information about the cfe-commits mailing list