[PATCH] D53765: [RFC prototype] Implementation of asm-goto support in LLVM

Alexander Ivchenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 26 07:59:41 PDT 2018


aivchenk created this revision.
Herald added subscribers: jfb, dexonsmith, steven_wu, eraman, mehdi_amini.
Herald added a reviewer: deadalnix.

This patch accompanies the RFC posted here:
http://lists.llvm.org/pipermail/llvm-dev/2018-October/127239.html

Once there is a consensus wrt the design of the feature, I will modify
this patch and split it into pieces for a proper review.

Even though this patch is definitely a prototype, it was tested quite
well, including the heavy-lifting of building the linux kernel
(kudos to Nick Desaulniers for doing that!).

One known problem in the implementation that I would like to mention
is that terminating callbr instruction is translated into INLINEASM
machine instruction, which is not a terminator. There are several crude
workarounds that we had to put in the code (e.g. see AsmPrinter.cpp) for
that. It has to be addressed in a better way and I would appreciate your
thoughts on that.

Authored By: Alexander Ivchenko, Mikhail Dvoretckii


https://reviews.llvm.org/D53765

Files:
  include/llvm-c/Core.h
  include/llvm/Analysis/SparsePropagation.h
  include/llvm/Bitcode/LLVMBitCodes.h
  include/llvm/CodeGen/GlobalISel/IRTranslator.h
  include/llvm/IR/CallSite.h
  include/llvm/IR/IRBuilder.h
  include/llvm/IR/InstVisitor.h
  include/llvm/IR/Instruction.def
  include/llvm/IR/Instructions.h
  lib/AsmParser/LLLexer.cpp
  lib/AsmParser/LLParser.cpp
  lib/AsmParser/LLParser.h
  lib/AsmParser/LLToken.h
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  lib/CodeGen/CodeGenPrepare.cpp
  lib/CodeGen/GlobalISel/IRTranslator.cpp
  lib/CodeGen/IndirectBrExpandPass.cpp
  lib/CodeGen/MachineBasicBlock.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
  lib/CodeGen/TargetLoweringBase.cpp
  lib/IR/AsmWriter.cpp
  lib/IR/Instruction.cpp
  lib/IR/Instructions.cpp
  lib/IR/Verifier.cpp
  lib/Target/X86/X86InstrInfo.cpp
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  lib/Transforms/InstCombine/InstCombineInternal.h
  lib/Transforms/InstCombine/InstructionCombining.cpp
  lib/Transforms/Scalar/JumpThreading.cpp
  lib/Transforms/Scalar/SCCP.cpp
  lib/Transforms/Utils/BasicBlockUtils.cpp
  lib/Transforms/Utils/InlineFunction.cpp
  lib/Transforms/Utils/Local.cpp
  lib/Transforms/Utils/LoopSimplify.cpp
  lib/Transforms/Utils/LoopUtils.cpp
  lib/Transforms/Utils/SimplifyCFG.cpp
  test/Bitcode/callbr.ll
  test/Bitcode/callbr.ll.bc
  test/CodeGen/X86/callbr-asm-destinations.ll
  test/CodeGen/X86/callbr-asm-errors.ll
  test/CodeGen/X86/callbr-asm-outputs.ll
  test/CodeGen/X86/callbr-asm.ll
  test/Transforms/MergeFunc/call-and-invoke-with-ranges.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53765.171303.patch
Type: text/x-patch
Size: 102417 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181026/9f332d46/attachment-0001.bin>


More information about the llvm-commits mailing list