[llvm-commits] [llvm] r108039 - in /llvm/trunk: include/llvm/CodeGen/ include/llvm/Target/ lib/CodeGen/ lib/CodeGen/SelectionDAG/ lib/Target/X86/ lib/Target/XCore/ test/CodeGen/X86/ utils/TableGen/

Jakob Stoklund Olesen stoklund at 2pi.dk
Sat Jul 10 08:27:37 PDT 2010


On Jul 10, 2010, at 2:00 AM, Dan Gohman wrote:

>   if (OptLevel != CodeGenOpt::None) {
> +    // With optimization, dead code should already be eliminated. However
> +    // there is one known exception: lowered code for arguments that are only
> +    // used by tail calls, where the tail calls reuse the incoming stack
> +    // arguments directly (see t11 in test/CodeGen/X86/sibcall.ll).
> +    PM.add(createDeadMachineInstructionElimPass());
> +    printAndVerify(PM, "After codegen DCE pass",
> +                   /* allowDoubleDefs= */ true);
> +

I think that dead CopyFromReg nodes following a call or inline asm are also still emitted.

They should actually be safe to omit now that st(0) return values are popped with an FpGET_ST0 instruction instead of CopyFromReg.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100710/62ed94e8/attachment.bin>


More information about the llvm-commits mailing list