[LLVMdev] Specify dominator for BasicBlock to avoid "Instruction does not dominate all uses!"

ether zhhb etherzhhb at gmail.com
Mon Oct 11 19:13:02 PDT 2010


Hi,

You may run the "RegToMem" pass before unify multiple exits of a loop
into a unique basic block, which will demotes all registers to memory
references, so you do not need to worried if your transform break the
SSA form.

and here is the introduction of RegToMem:
//===----------------------------------------------------------------------===//
//
// This file demotes all registers to memory references.  It is intented to be
// the inverse of PromoteMemoryToRegister.  By converting to loads, the only
// values live accross basic blocks are allocas and loads before phi nodes.
// It is intended that this should make CFG hacking much easier.
// To make later hacking easier, the entry block is split into two, such that
// all introduced allocas and nothing else are in the entry block.
//
//===----------------------------------------------------------------------===//

best regards
ether



More information about the llvm-dev mailing list