[llvm-commits] [llvm] r66870 - in /llvm/trunk/lib/CodeGen: RegAllocLinearScan.cpp RegAllocPBQP.cpp VirtRegMap.cpp VirtRegMap.h
Sanjiv.Gupta at microchip.com
Sanjiv.Gupta at microchip.com
Tue Mar 17 04:00:38 PDT 2009
Looks like this breaks PBQP (at least for PIC16).
llc: /home/i00171/projects/c16/include/llvm/PassAnalysisSupport.h:199: AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*) const [with AnalysisType = llvm::VirtRegMap]: Assertion `ResultPass && "getAnalysis*() called on an analysis that was not " "'required' by pass!"' failed.
0 llc 0x087e2206
1 llc 0x087e27ef
2 libc.so.6 0x0015b0d8
3 libc.so.6 0x0015c705 abort + 469
4 libc.so.6 0x00154619
5 llc 0x0858c766 llvm::VirtRegMap& llvm::Pass::getAnalysisID<llvm::VirtRegMap>(llvm::PassInfo const*) const + 190
6 llc 0x0858c83e llvm::VirtRegMap& llvm::Pass::getAnalysis<llvm::VirtRegMap>() const + 90
7 llc 0x08593fd0
8 llc 0x083837be llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 52
9 llc 0x0876145d llvm::FPPassManager::runOnFunction(llvm::Function&) + 289
10 llc 0x087619ee llvm::FunctionPassManagerImpl::run(llvm::Function&) + 124
11 llc 0x08761b77 llvm::FunctionPassManager::run(llvm::Function&) + 159
12 llc 0x0833e099 main + 2673
13 libc.so.6 0x0014879a __libc_start_main + 218
14 llc 0x0833c2d1 dlopen + 65
Stack dump:
0. Program arguments: llc -regalloc=pbqp -f -march=pic16 direct_load_char.bc
1. Running pass 'PBQP Register Allocator' on function '@main'
The test case is
; ModuleID = 'direct_load_char.c'
target datalayout = "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8"
target triple = "pic16-pc-linux-gnu"
%struct.__block_descriptor = type { i32, i32 }
%struct.__block_literal_generic = type { i8*, i16, i16, i8*, %struct.__block_descriptor* }
@ptr = global i8* inttoptr (i64 160 to i8*), align 1 ; <i8**> [#uses=1]
@i = common global i8 0, align 1 ; <i8*> [#uses=2]
@k = common global i8 0, align 1 ; <i8*> [#uses=2]
@j = global i8 1, align 1 ; <i8*> [#uses=3]
define void @main() nounwind {
entry:
%tmp = load i8* @j ; <i8> [#uses=1]
store i8 %tmp, i8* @i
%tmp1 = load i8* @i ; <i8> [#uses=1]
store i8 %tmp1, i8* @k
%tmp2 = load i8* @k ; <i8> [#uses=1]
store i8 %tmp2, i8* @j
%tmp3 = load i8** @ptr ; <i8*> [#uses=1]
%tmp4 = load i8* @j ; <i8> [#uses=1]
store i8 %tmp4, i8* %tmp3
ret void
}
- Sanjiv
-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu on behalf of Owen Anderson
Sent: Fri 3/13/2009 11:25 AM
To: llvm-commits at cs.uiuc.edu
Subject: [llvm-commits] [llvm] r66870 - in /llvm/trunk/lib/CodeGen: RegAllocLinearScan.cpp RegAllocPBQP.cpp VirtRegMap.cpp VirtRegMap.h
Author: resistor
Date: Fri Mar 13 00:55:11 2009
New Revision: 66870
URL: http://llvm.org/viewvc/llvm-project?rev=66870&view=rev
Log:
Convert VirtRegMap to a MachineFunctionPass.
Modified:
llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp
llvm/trunk/lib/CodeGen/VirtRegMap.cpp
llvm/trunk/lib/CodeGen/VirtRegMap.h
Modified: llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp?rev=66870&r1=66869&r2=66870&view=diff
--- llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp Fri Mar 13 00:55:11 2009
@@ -799,8 +799,7 @@
lss = &getAnalysis<LiveStacks>();
loopInfo = &getAnalysis<MachineLoopInfo>();
- std::auto_ptr<VirtRegMap> vrmAutoPtr(new VirtRegMap(*mf));
- vrm = vrmAutoPtr.get();
+ vrm = &getAnalysis<VirtRegMap>();
DOUT << "PBQP Register Allocating for " << mf->getFunction()->getName() << "\n";
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090317/bdc64329/attachment.html>
More information about the llvm-commits
mailing list