mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Give gccld more guts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9835 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -16,6 +16,7 @@
|
|||||||
#include "gccld.h"
|
#include "gccld.h"
|
||||||
#include "llvm/Module.h"
|
#include "llvm/Module.h"
|
||||||
#include "llvm/PassManager.h"
|
#include "llvm/PassManager.h"
|
||||||
|
#include "llvm/Analysis/LoadValueNumbering.h"
|
||||||
#include "llvm/Bytecode/WriteBytecodePass.h"
|
#include "llvm/Bytecode/WriteBytecodePass.h"
|
||||||
#include "llvm/Target/TargetData.h"
|
#include "llvm/Target/TargetData.h"
|
||||||
#include "llvm/Transforms/IPO.h"
|
#include "llvm/Transforms/IPO.h"
|
||||||
@ -84,6 +85,13 @@ GenerateBytecode (Module *M, bool Strip, bool Internalize, std::ostream *Out) {
|
|||||||
if (!DisableInline)
|
if (!DisableInline)
|
||||||
Passes.add(createFunctionInliningPass()); // Inline small functions
|
Passes.add(createFunctionInliningPass()); // Inline small functions
|
||||||
|
|
||||||
|
// Run a few AA driven optimizations here and now, to cleanup the code.
|
||||||
|
// Eventually we should put an IP AA in place here.
|
||||||
|
|
||||||
|
Passes.add(createLICMPass()); // Hoist loop invariants
|
||||||
|
Passes.add(createLoadValueNumberingPass()); // GVN for load instructions
|
||||||
|
Passes.add(createGCSEPass()); // Remove common subexprs
|
||||||
|
|
||||||
// The FuncResolve pass may leave cruft around if functions were prototyped
|
// The FuncResolve pass may leave cruft around if functions were prototyped
|
||||||
// differently than they were defined. Remove this cruft.
|
// differently than they were defined. Remove this cruft.
|
||||||
Passes.add(createInstructionCombiningPass());
|
Passes.add(createInstructionCombiningPass());
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
##===- tools/gccld/Makefile ------------------------------*- Makefile -*-===##
|
##===- tools/gccld/Makefile --------------------------------*- Makefile -*-===##
|
||||||
#
|
#
|
||||||
# The LLVM Compiler Infrastructure
|
# The LLVM Compiler Infrastructure
|
||||||
#
|
#
|
||||||
@ -6,10 +6,11 @@
|
|||||||
# the University of Illinois Open Source License. See LICENSE.TXT for details.
|
# the University of Illinois Open Source License. See LICENSE.TXT for details.
|
||||||
#
|
#
|
||||||
##===----------------------------------------------------------------------===##
|
##===----------------------------------------------------------------------===##
|
||||||
|
|
||||||
LEVEL = ../..
|
LEVEL = ../..
|
||||||
|
|
||||||
TOOLNAME = gccld
|
TOOLNAME = gccld
|
||||||
USEDLIBS = ipo.a analysis.a transforms.a ipa.a scalaropts.a transformutils.a \
|
USEDLIBS = ipo.a transforms.a scalaropts.a analysis.a ipa.a transformutils.a \
|
||||||
target.a bcreader bcwriter vmcore support.a
|
target.a bcreader bcwriter vmcore support.a
|
||||||
|
|
||||||
include $(LEVEL)/Makefile.common
|
include $(LEVEL)/Makefile.common
|
||||||
|
Reference in New Issue
Block a user