mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Miscellaneous cleanups:
* Convert post to pre-increment for for loops * Use generic programming more * Use new Value::cast* instructions * Use new Module, Method, & BasicBlock forwarding methods * Use new facilities in STLExtras.h * Use new Instruction::isPHINode() method git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -73,7 +73,7 @@ void BasicBlock::dropAllReferences() {
|
||||
//
|
||||
bool BasicBlock::hasConstantPoolReferences() const {
|
||||
for (use_const_iterator I = use_begin(), E = use_end(); I != E; ++I)
|
||||
if ((*I)->getValueType() == ConstantVal)
|
||||
if ((*I)->isConstant())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@ -91,7 +91,7 @@ bool BasicBlock::hasConstantPoolReferences() const {
|
||||
// cause a degenerate basic block to be formed, having a terminator inside of
|
||||
// the basic block).
|
||||
//
|
||||
BasicBlock *BasicBlock::splitBasicBlock(InstListType::iterator I) {
|
||||
BasicBlock *BasicBlock::splitBasicBlock(iterator I) {
|
||||
assert(getTerminator() && "Can't use splitBasicBlock on degenerate BB!");
|
||||
assert(I != InstList.end() &&
|
||||
"Trying to get me to create degenerate basic block!");
|
||||
@ -102,7 +102,7 @@ BasicBlock *BasicBlock::splitBasicBlock(InstListType::iterator I) {
|
||||
// to the new basic block...
|
||||
Instruction *Inst = 0;
|
||||
do {
|
||||
InstListType::iterator EndIt = InstList.end();
|
||||
iterator EndIt = end();
|
||||
Inst = InstList.remove(--EndIt); // Remove from end
|
||||
New->InstList.push_front(Inst); // Add to front
|
||||
} while (Inst != *I); // Loop until we move the specified instruction.
|
||||
|
Reference in New Issue
Block a user