LLVM backend for 6502
Go to file
Stepan Dyatkovskiy c10fa6c801 Taken into account Duncan's comments for r149481 dated by 2nd Feb 2012:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120130/136146.html

Implemented CaseIterator and it solves almost all described issues: we don't need to mix operand/case/successor indexing anymore. Base iterator class is implemented as a template since it may be initialized either from "const SwitchInst*" or from "SwitchInst*".

ConstCaseIt is just a read-only iterator.
CaseIt is read-write iterator; it allows to change case successor and case value.

Usage of iterator allows totally remove resolveXXXX methods. All indexing convertions done automatically inside the iterator's getters.

Main way of iterator usage looks like this:
SwitchInst *SI = ... // intialize it somehow

for (SwitchInst::CaseIt i = SI->caseBegin(), e = SI->caseEnd(); i != e; ++i) {
  BasicBlock *BB = i.getCaseSuccessor();
  ConstantInt *V = i.getCaseValue();
  // Do something.
}

If you want to convert case number to TerminatorInst successor index, just use getSuccessorIndex iterator's method.
If you want initialize iterator from TerminatorInst successor index, use CaseIt::fromSuccessorIndex(...) method.

There are also related changes in llvm-clients: klee and clang.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152297 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-08 07:06:20 +00:00
autoconf configure: Don't require a perl interpreter to be present, LLVM's buildsystem doesn't depend on perl anymore. 2012-03-07 17:07:20 +00:00
bindings ocaml bindings: landing pad is now the last opcode. 2012-02-07 18:58:19 +00:00
cmake Minimal changes for LLVM to compile under VS11. 2012-03-01 22:42:52 +00:00
docs Add column width. 2012-03-06 09:23:25 +00:00
examples Switch to a more idiomatic way of silencing unused variable warnings in 2012-02-20 00:02:49 +00:00
include Taken into account Duncan's comments for r149481 dated by 2nd Feb 2012: 2012-03-08 07:06:20 +00:00
lib Taken into account Duncan's comments for r149481 dated by 2nd Feb 2012: 2012-03-08 07:06:20 +00:00
projects configure: Don't require a perl interpreter to be present, LLVM's buildsystem doesn't depend on perl anymore. 2012-03-07 17:07:20 +00:00
runtime Fixing a warning in MSVC (this is also a test commit) 2012-02-05 19:43:39 +00:00
test Test case for r152280, r152285 and r152290. 2012-03-08 03:32:42 +00:00
tools Taken into account Duncan's comments for r149481 dated by 2nd Feb 2012: 2012-03-08 07:06:20 +00:00
unittests Add support to the hashing infrastructure for automatically hashing both 2012-03-07 09:32:32 +00:00
utils Re-commit r152202 hopefully fixing the MSVC linker error. 2012-03-08 06:55:27 +00:00
.gitignore
CMakeLists.txt add LLVM_VERSION_MAJOR and _MINOR defines 2012-02-13 18:48:10 +00:00
configure configure: Don't require a perl interpreter to be present, LLVM's buildsystem doesn't depend on perl anymore. 2012-03-07 17:07:20 +00:00
CREDITS.TXT Add myself to the credits file 2012-02-29 16:43:11 +00:00
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt LLVMBuild: Introduce a common section which currently has a list of the 2011-12-12 22:45:54 +00:00
Makefile
Makefile.common
Makefile.config.in configure: Don't require a perl interpreter to be present, LLVM's buildsystem doesn't depend on perl anymore. 2012-03-07 17:07:20 +00:00
Makefile.rules build/Darwin: Make it easy to cause all tools to get codesigned (with make CODESIGN_TOOLS=1). 2012-03-06 19:07:38 +00:00
README.txt test commit 2012-02-07 08:18:05 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.

If you're writing a package for LLVM, see docs/Packaging.html for our
suggestions.