mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Broad superficial changes:
* Renamed getOpcode to getOpcodeName * Changed getOpcodeName to return a const char * instead of string * Added a getOpcode method to replace getInstType * Changed code to use getOpcode instead of getInstType git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -73,7 +73,7 @@ inline static bool
|
||||
ConstantFoldUnaryInst(Method *M, Method::inst_iterator &DI,
|
||||
UnaryOperator *Op, ConstPoolVal *D) {
|
||||
ConstPoolVal *ReplaceWith =
|
||||
opt::ConstantFoldUnaryInstruction(Op->getInstType(), D);
|
||||
opt::ConstantFoldUnaryInstruction(Op->getOpcode(), D);
|
||||
|
||||
if (!ReplaceWith) return false; // Nothing new to change...
|
||||
|
||||
@@ -100,7 +100,7 @@ ConstantFoldBinaryInst(Method *M, Method::inst_iterator &DI,
|
||||
BinaryOperator *Op,
|
||||
ConstPoolVal *D1, ConstPoolVal *D2) {
|
||||
ConstPoolVal *ReplaceWith =
|
||||
opt::ConstantFoldBinaryInstruction(Op->getInstType(), D1, D2);
|
||||
opt::ConstantFoldBinaryInstruction(Op->getOpcode(), D1, D2);
|
||||
if (!ReplaceWith) return false; // Nothing new to change...
|
||||
|
||||
// Add the new value to the constant pool...
|
||||
@@ -126,7 +126,7 @@ ConstantFoldBinaryInst(Method *M, Method::inst_iterator &DI,
|
||||
//
|
||||
bool opt::ConstantFoldTerminator(TerminatorInst *T) {
|
||||
// Branch - See if we are conditional jumping on constant
|
||||
if (T->getInstType() == Instruction::Br) {
|
||||
if (T->getOpcode() == Instruction::Br) {
|
||||
BranchInst *BI = (BranchInst*)T;
|
||||
if (BI->isUnconditional()) return false; // Can't optimize uncond branch
|
||||
BasicBlock *Dest1 = BI->getOperand(0)->castBasicBlockAsserting();
|
||||
|
Reference in New Issue
Block a user