[LLVMdev] Disappearing Machine Basic Blocks (for new instruction)

Evan Cheng evan.cheng at apple.com
Fri Sep 19 17:11:17 PDT 2008


For anyone to have any shot of answering your question, you need to  
provide more information. To start, please figure out which pass  
deleted the block, what does the machine function looks like before  
and after.

Evan

On Sep 19, 2008, at 4:14 PM, Edward Lee wrote:

> I have a new instruction that takes 2 labels, and in SelectionDAGISel,
> I have it doing "CurMBB->addSuccessor()" for both machine blocks. The
> DAG node it creates also takes both blocks as SDOperands.
>
> When I lower to x86, the not-fallthrough block disappears. If I run
> llc with --fast, the blocks stay around, so it must be an optimization
> pass of some sort that doesn't realize my new instruction is
> branch-like.
>
> How do I tell LLVM to not delete the target blocks of my instruction?
>
> Here's a list of files I've modified so far:
> M llvm-2.3/include/llvm/CodeGen/SelectionDAGNodes.h
> M llvm-2.3/include/llvm/Instruction.def
> M llvm-2.3/include/llvm/Instructions.h
> M llvm-2.3/include/llvm/Support/InstVisitor.h
> M llvm-2.3/lib/AsmParser/LLLexer.cpp
> M llvm-2.3/lib/AsmParser/llvmAsmParser.cpp.cvs
> M llvm-2.3/lib/AsmParser/llvmAsmParser.h.cvs
> M llvm-2.3/lib/AsmParser/llvmAsmParser.y
> M llvm-2.3/lib/AsmParser/llvmAsmParser.y.cvs
> M llvm-2.3/lib/Bitcode/Reader/BitcodeReader.cpp
> M llvm-2.3/lib/Bitcode/Writer/BitcodeWriter.cpp
> M llvm-2.3/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
> M llvm-2.3/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
> M llvm-2.3/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
> M llvm-2.3/lib/Target/TargetSelectionDAG.td
> M llvm-2.3/lib/Target/X86/X86InstrInfo.td
> M llvm-2.3/lib/VMCore/Instruction.cpp
> M llvm-2.3/lib/VMCore/Instructions.cpp
>
> Ed
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list