[PATCH] [Review Request] Function-based parallel LLVM backend code generation

Wan, Xiaofei xiaofei.wan at intel.com
Tue Oct 8 01:34:40 PDT 2013


Hi echristo, chandlerc,

In this patch, function-based parallelism is adopted to accelerate backend code generation. Please review/discuss it.

1. Essentially, it starts multiple threads to compile a module, each thread has its own function pass manager, each function pass manager compile functions in parallel.

2. All passes in function pass manager work in parallelism except AsmPrinter; AsmPrinter is shared by different thread which is responsible for merging binaries genrated by function pass manger.

3. The main work are making passes re-entrant and merging/sorting binaries in AsmPrinter pass.

Please refer below document for details:
https://docs.google.com/document/d/1QSkP6AumMCAVpgzwympD5pI3btPJt4SRgjY-vhyfySg/edit?usp=sharing 



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

Files:
  include/llvm/CodeGen/AsmPrinter.h
  include/llvm/CodeGen/MachineModuleInfo.h
  include/llvm/IR/Function.h
  include/llvm/IR/GlobalValue.h
  include/llvm/IR/LLVMContext.h
  include/llvm/IR/Module.h
  include/llvm/IR/Use.h
  include/llvm/IR/Value.h
  include/llvm/MC/MCAssembler.h
  include/llvm/MC/MCContext.h
  include/llvm/MC/MCObjectStreamer.h
  include/llvm/MC/MCStreamer.h
  include/llvm/Pass.h
  include/llvm/PassManager.h
  include/llvm/PassManagers.h
  include/llvm/Support/Allocator.h
  include/llvm/Support/Mutex.h
  include/llvm/Support/RWMutex.h
  include/llvm/Support/Threading.h
  include/llvm/Support/ValueHandle.h
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  lib/CodeGen/AsmPrinter/DwarfDebug.h
  lib/CodeGen/AsmPrinter/DwarfException.h
  lib/CodeGen/MachineFunction.cpp
  lib/CodeGen/MachineModuleInfo.cpp
  lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  lib/IR/Attributes.cpp
  lib/IR/Constants.cpp
  lib/IR/DebugLoc.cpp
  lib/IR/Function.cpp
  lib/IR/InlineAsm.cpp
  lib/IR/LeakDetector.cpp
  lib/IR/LLVMContext.cpp
  lib/IR/LLVMContextImpl.cpp
  lib/IR/LLVMContextImpl.h
  lib/IR/Metadata.cpp
  lib/IR/Module.cpp
  lib/IR/PassManager.cpp
  lib/IR/PassRegistry.cpp
  lib/IR/Type.cpp
  lib/IR/Value.cpp
  lib/MC/MCAssembler.cpp
  lib/MC/MCContext.cpp
  lib/MC/MCObjectStreamer.cpp
  lib/Support/Allocator.cpp
  lib/Support/Threading.cpp
  lib/Target/AArch64/AArch64AsmPrinter.cpp
  lib/Target/AArch64/AArch64AsmPrinter.h
  lib/Target/ARM/ARMAsmPrinter.cpp
  lib/Target/ARM/ARMAsmPrinter.h
  lib/Target/Mangler.cpp
  lib/Target/Mips/MipsAsmPrinter.cpp
  lib/Target/Mips/MipsAsmPrinter.h
  lib/Target/R600/AMDGPUAsmPrinter.cpp
  lib/Target/R600/AMDGPUAsmPrinter.h
  lib/Target/SystemZ/SystemZAsmPrinter.cpp
  lib/Target/X86/X86AsmPrinter.cpp
  lib/Target/X86/X86AsmPrinter.h
  lib/Transforms/Scalar/LoopStrengthReduce.cpp
  tools/llc/llc.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1857.1.patch
Type: text/x-patch
Size: 141567 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131008/0715753d/attachment.bin>


More information about the llvm-commits mailing list