[llvm-commits] [llvm] r115965 - in /llvm/trunk: include/llvm-c/Initialization.h include/llvm/InitializePasses.h lib/Transforms/InstCombine/InstructionCombining.cpp
Owen Anderson
resistor at mac.com
Thu Oct 7 13:04:55 PDT 2010
Author: resistor
Date: Thu Oct 7 15:04:55 2010
New Revision: 115965
URL: http://llvm.org/viewvc/llvm-project?rev=115965&view=rev
Log:
Add initialization routines to InstCombine.
Modified:
llvm/trunk/include/llvm-c/Initialization.h
llvm/trunk/include/llvm/InitializePasses.h
llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
Modified: llvm/trunk/include/llvm-c/Initialization.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Initialization.h?rev=115965&r1=115964&r2=115965&view=diff
==============================================================================
--- llvm/trunk/include/llvm-c/Initialization.h (original)
+++ llvm/trunk/include/llvm-c/Initialization.h Thu Oct 7 15:04:55 2010
@@ -25,6 +25,7 @@
void LLVMInitializeCore(LLVMPassRegistryRef R);
void LLVMInitializeTransformUtils(LLVMPassRegistryRef R);
void LLVMInitializeScalarOpts(LLVMPassRegistryRef R);
+void LLVMInitializeInstCombine(LLVMPassRegistryRef R);
void LLVMInitializeIPO(LLVMPassRegistryRef R);
void LLVMInitializeAnalysis(LLVMPassRegistryRef R);
void LLVMInitializeIPA(LLVMPassRegistryRef R);
Modified: llvm/trunk/include/llvm/InitializePasses.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/InitializePasses.h?rev=115965&r1=115964&r2=115965&view=diff
==============================================================================
--- llvm/trunk/include/llvm/InitializePasses.h (original)
+++ llvm/trunk/include/llvm/InitializePasses.h Thu Oct 7 15:04:55 2010
@@ -31,6 +31,10 @@
/// ScalarOpts library.
void initializeScalarOpts(PassRegistry&);
+/// initializeInstCombine - Initialize all passes linked into the
+/// ScalarOpts library.
+void initializeInstCombine(PassRegistry&);
+
/// initializeIPO - Initialize all passes linked into the IPO library.
void initializeIPO(PassRegistry&);
Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp?rev=115965&r1=115964&r2=115965&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Thu Oct 7 15:04:55 2010
@@ -48,6 +48,7 @@
#include "llvm/Support/PatternMatch.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/Statistic.h"
+#include "llvm-c/Initialization.h"
#include <algorithm>
#include <climits>
using namespace llvm;
@@ -58,6 +59,14 @@
STATISTIC(NumDeadInst , "Number of dead inst eliminated");
STATISTIC(NumSunkInst , "Number of instructions sunk");
+// Initialization Routines
+void llvm::initializeInstCombine(PassRegistry &Registry) {
+ initializeInstCombinerPass(Registry);
+}
+
+void LLVMInitializeInstCombine(LLVMPassRegistryRef R) {
+ initializeInstCombine(*unwrap(R));
+}
char InstCombiner::ID = 0;
INITIALIZE_PASS(InstCombiner, "instcombine",
More information about the llvm-commits
mailing list