[LLVMdev] Specify dominator for BasicBlock to avoid "Instruction does not dominate all uses!"
ether zhhb
etherzhhb at gmail.com
Tue Oct 12 05:49:38 PDT 2010
hi,
you may also add something like this in the "getAnalysisUsage" of your pass:
AU.addRequiredID(DemoteRegisterToMemoryID);
After this, the reg2mem pass will always run before your pass.
best regards
ether
On Tue, Oct 12, 2010 at 8:24 PM, Xinfinity <xinfinity_a at yahoo.com> wrote:
>
> Hi, I tried adding the PHI nodes in BB_unique, and it works for the simple
> case described here, but in case the nodes were declared in some
> predecessors of ExitBB1 and used in ExitBB1_redirect and its successors, it
> won't work, unless I create entries for all of them in BB_unique.
>
> B1 (declares PHI_1) B3
> | |
> B2 |
> | |
> ExitBB1 ExitBB2
> |
> Succ1 (uses PHI_1)
>
> becomes:
>
> B1 (declares PHI_1) B3
> | |
> B2 |
> | |
> ExitBB1 ExitBB2
> | |
> -------------------------------------------------------
> |
> BB_unique
> / \
> ExitBB1_redirect ExitBB2_redirect
> |
> Succ1 (uses PHI_1)
>
>
>
>
>
> Devang Patel wrote:
>>
>>
>>
>> One approach is to use insert PHI nodes in BB_unique for values defined in
>> ExitBB1 and use these phi nodes in ExitBB1_redirect.
>>
>>
>>
>> Devang
>>
>>
>>
>
> I will use the pass -reg2mem, as suggested by ether, to avoid to PHI nodes
> altogether.
>
> Thanks,
> Alexandra
> -
>
> --
> View this message in context: http://old.nabble.com/Specify-dominator-for-BasicBlock-to-avoid-%22Instruction-does-not-dominate-all-uses%21%22-tp29935454p29942642.html
> Sent from the LLVM - Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> 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