mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Constant folding here is pointless, because InstructionSimplify
(which does constant folding and more) is called a few lines later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120042 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -32,7 +32,6 @@
|
|||||||
#include "llvm/DerivedTypes.h"
|
#include "llvm/DerivedTypes.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
#include "llvm/Instructions.h"
|
#include "llvm/Instructions.h"
|
||||||
#include "llvm/Analysis/ConstantFolding.h"
|
|
||||||
#include "llvm/Analysis/InlineCost.h"
|
#include "llvm/Analysis/InlineCost.h"
|
||||||
#include "llvm/Analysis/InstructionSimplify.h"
|
#include "llvm/Analysis/InstructionSimplify.h"
|
||||||
#include "llvm/Analysis/LoopInfo.h"
|
#include "llvm/Analysis/LoopInfo.h"
|
||||||
@@ -969,13 +968,7 @@ void LoopUnswitch::SimplifyCode(std::vector<Instruction*> &Worklist, Loop *L) {
|
|||||||
while (!Worklist.empty()) {
|
while (!Worklist.empty()) {
|
||||||
Instruction *I = Worklist.back();
|
Instruction *I = Worklist.back();
|
||||||
Worklist.pop_back();
|
Worklist.pop_back();
|
||||||
|
|
||||||
// Simple constant folding.
|
|
||||||
if (Constant *C = ConstantFoldInstruction(I)) {
|
|
||||||
ReplaceUsesOfWith(I, C, Worklist, L, LPM);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Simple DCE.
|
// Simple DCE.
|
||||||
if (isInstructionTriviallyDead(I)) {
|
if (isInstructionTriviallyDead(I)) {
|
||||||
DEBUG(dbgs() << "Remove dead instruction '" << *I);
|
DEBUG(dbgs() << "Remove dead instruction '" << *I);
|
||||||
|
Reference in New Issue
Block a user