[vmkit-commits] [vmkit] r109983 - in /vmkit/trunk/lib: J3/Compiler/JavaJIT.cpp J3/Compiler/LowerConstantCalls.cpp Mvm/Compiler/EscapeAnalysis.cpp Mvm/JITGCPass/JITGCPass.cpp Mvm/StaticGCPass/StaticGCPass.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Sun Aug 1 10:51:10 PDT 2010
Author: geoffray
Date: Sun Aug 1 12:51:09 2010
New Revision: 109983
URL: http://llvm.org/viewvc/llvm-project?rev=109983&view=rev
Log:
Move to new LLVM API.
Modified:
vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp
vmkit/trunk/lib/J3/Compiler/LowerConstantCalls.cpp
vmkit/trunk/lib/Mvm/Compiler/EscapeAnalysis.cpp
vmkit/trunk/lib/Mvm/JITGCPass/JITGCPass.cpp
vmkit/trunk/lib/Mvm/StaticGCPass/StaticGCPass.cpp
Modified: vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp?rev=109983&r1=109982&r2=109983&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp Sun Aug 1 12:51:09 2010
@@ -758,8 +758,8 @@
unsigned uses = temp->getNumUses();
if (!uses) {
temp->eraseFromParent();
- } else if (uses == 1 && dyn_cast<StoreInst>(temp->use_begin())) {
- dyn_cast<StoreInst>(temp->use_begin())->eraseFromParent();
+ } else if (uses == 1 && dyn_cast<StoreInst>(*(temp->use_begin()))) {
+ dyn_cast<StoreInst>(*(temp->use_begin()))->eraseFromParent();
temp->eraseFromParent();
}
}
@@ -773,8 +773,8 @@
unsigned uses = temp->getNumUses();
if (!uses) {
temp->eraseFromParent();
- } else if (uses == 1 && dyn_cast<StoreInst>(temp->use_begin())) {
- dyn_cast<StoreInst>(temp->use_begin())->eraseFromParent();
+ } else if (uses == 1 && dyn_cast<StoreInst>(*(temp->use_begin()))) {
+ dyn_cast<StoreInst>(*(temp->use_begin()))->eraseFromParent();
temp->eraseFromParent();
} else {
if (coop) {
Modified: vmkit/trunk/lib/J3/Compiler/LowerConstantCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/LowerConstantCalls.cpp?rev=109983&r1=109982&r2=109983&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/LowerConstantCalls.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/LowerConstantCalls.cpp Sun Aug 1 12:51:09 2010
@@ -161,8 +161,8 @@
bool ToDelete = true;
for (Value::use_iterator UI = AI->use_begin(), UE = AI->use_end();
UI != UE; ++UI) {
- if (dyn_cast<StoreInst>(UI)) continue;
- if (BitCastInst* BI = dyn_cast<BitCastInst>(UI)) {
+ if (dyn_cast<StoreInst>(*UI)) continue;
+ if (BitCastInst* BI = dyn_cast<BitCastInst>(*UI)) {
if (BI->hasOneUse()) {
CallSite Call = CallSite::get(*(BI->use_begin()));
Instruction* CI = Call.getInstruction();
Modified: vmkit/trunk/lib/Mvm/Compiler/EscapeAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Compiler/EscapeAnalysis.cpp?rev=109983&r1=109982&r2=109983&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/Compiler/EscapeAnalysis.cpp (original)
+++ vmkit/trunk/lib/Mvm/Compiler/EscapeAnalysis.cpp Sun Aug 1 12:51:09 2010
@@ -83,7 +83,7 @@
bool escapesLoop = false;
for (Value::use_iterator U = I->use_begin(), E = I->use_end();
U != E; ++U) {
- if (Instruction* II = dyn_cast<Instruction>(U)) {
+ if (Instruction* II = dyn_cast<Instruction>(*U)) {
BasicBlock* BBU = II->getParent();
if (!CurLoop->contains(BBU)) {
escapesLoop = true;
@@ -114,7 +114,7 @@
static bool escapes(Value* Ins, std::map<Instruction*, bool>& visited) {
for (Value::use_iterator I = Ins->use_begin(), E = Ins->use_end();
I != E; ++I) {
- if (Instruction* II = dyn_cast<Instruction>(I)) {
+ if (Instruction* II = dyn_cast<Instruction>(*I)) {
if (II->getOpcode() == Instruction::Call ||
II->getOpcode() == Instruction::Invoke) {
Modified: vmkit/trunk/lib/Mvm/JITGCPass/JITGCPass.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/JITGCPass/JITGCPass.cpp?rev=109983&r1=109982&r2=109983&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/JITGCPass/JITGCPass.cpp (original)
+++ vmkit/trunk/lib/Mvm/JITGCPass/JITGCPass.cpp Sun Aug 1 12:51:09 2010
@@ -48,7 +48,7 @@
for (Value::use_iterator I = gcrootFun->use_begin(),
E = gcrootFun->use_end(); I != E; ++I) {
- if (Instruction* II = dyn_cast<Instruction>(I)) {
+ if (Instruction* II = dyn_cast<Instruction>(*I)) {
Function* F = II->getParent()->getParent();
if (!F->hasGC()) F->setGC("vmkit");
}
Modified: vmkit/trunk/lib/Mvm/StaticGCPass/StaticGCPass.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/StaticGCPass/StaticGCPass.cpp?rev=109983&r1=109982&r2=109983&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/StaticGCPass/StaticGCPass.cpp (original)
+++ vmkit/trunk/lib/Mvm/StaticGCPass/StaticGCPass.cpp Sun Aug 1 12:51:09 2010
@@ -52,7 +52,7 @@
bool error = false;
for (Value::use_iterator I = gcrootFun->use_begin(),
E = gcrootFun->use_end(); I != E; ++I) {
- if (Instruction* II = dyn_cast<Instruction>(I)) {
+ if (Instruction* II = dyn_cast<Instruction>(*I)) {
Function* F = II->getParent()->getParent();
if (F->hasGC()) F->clearGC();
F->setGC("ocaml");
More information about the vmkit-commits
mailing list