LLVM backend for 6502
Go to file
Stepan Dyatkovskiy 484fc93eff PR1255: Case Ranges
Implemented IntItem - the wrapper around APInt. Why not to use APInt item directly right now?
1. It will very difficult to implement case ranges as series of small patches. We got several large and heavy patches. Each patch will about 90-120 kb. If you replace ConstantInt with APInt in SwitchInst you will need to changes at the same time all Readers,Writers and absolutely all passes that uses SwitchInst.
2. We can implement APInt pool inside and save memory space. E.g. we use several switches that works with 256 bit items (switch on signatures, or strings). We can avoid value duplicates in this case.
3. IntItem can be easyly easily replaced with APInt.
4. Currenly we can interpret IntItem both as ConstantInt and as APInt. It allows to provide SwitchInst methods that works with ConstantInt for non-updated passes.

Why I need it right now? Currently I need to update SimplifyCFG pass (EqualityComparisons). I need to work with APInts directly a lot, so peaces of code
ConstantInt *V = ...;
if (V->getValue().ugt(AnotherV->getValue()) {
  ...
}
will look awful. Much more better this way:
IntItem V = ConstantIntVal->getValue();
if (AnotherV < V) {
}

Of course any reviews are welcome.

P.S.: I'm also going to rename ConstantRangesSet to IntegersSubset, and CRSBuilder to IntegersSubsetMapping (allows to map individual subsets of integers to the BasicBlocks).
Since in future these classes will founded on APInt, it will possible to use them in more generic ways.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157576 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-28 12:39:09 +00:00
autoconf Remove the PTX back-end and all of its artifacts (triple, etc.) 2012-05-24 21:38:21 +00:00
bindings [python] Add negative MemoryBuffer testcase 2012-03-22 11:23:52 +00:00
cmake Fix how CMake appends -m32 to linker command-lines 2012-05-23 18:42:02 +00:00
docs rdar://11542750 - llvm.trap should be marked no return. 2012-05-27 23:20:41 +00:00
examples Remove llvm-ld and llvm-stub (which is only used by llvm-ld). 2012-04-19 19:27:54 +00:00
include PR1255: Case Ranges 2012-05-28 12:39:09 +00:00
lib PR1255: Case Ranges 2012-05-28 12:39:09 +00:00
projects Remove the PTX back-end and all of its artifacts (triple, etc.) 2012-05-24 21:38:21 +00:00
runtime Small code cleanup. No functionality change. 2012-05-25 21:57:59 +00:00
test rdar://11542750 - llvm.trap should be marked no return. 2012-05-27 23:20:41 +00:00
tools Plug a leak when using MCJIT. 2012-05-20 17:24:08 +00:00
unittests Remove the PTX back-end and all of its artifacts (triple, etc.) 2012-05-24 21:38:21 +00:00
utils switch AttrListPtr::get to take an ArrayRef, simplifying a lot of clients. 2012-05-28 01:47:44 +00:00
.gitignore Add tools/lld to .gitignore. 2012-05-02 21:25:32 +00:00
CMakeLists.txt Remove the PTX back-end and all of its artifacts (triple, etc.) 2012-05-24 21:38:21 +00:00
configure Remove the PTX back-end and all of its artifacts (triple, etc.) 2012-05-24 21:38:21 +00:00
CREDITS.TXT Update the documentation of CellSPU, in case it gets removed in 3.1. 2012-04-29 20:00:55 +00:00
LICENSE.TXT Add YAML parser to Support. 2012-04-03 23:09:22 +00:00
llvm.spec.in Tidy up. s/Low Level Virtual Machine/LLVM/. 2012-01-25 22:00:23 +00:00
LLVMBuild.txt LLVMBuild: Introduce a common section which currently has a list of the 2011-12-12 22:45:54 +00:00
Makefile Do not install llvm-config-host for cross-builds of clang. rdar://11317847 2012-05-09 00:07:02 +00:00
Makefile.common [docs] Remove unsupported references to ExtraSource variable. 2012-05-15 21:32:27 +00:00
Makefile.config.in - Added ExecutionEngine/MCJIT tests 2012-05-17 21:07:47 +00:00
Makefile.rules llvm-ld does not exist anymore, use llvm-link instead. 2012-05-23 20:34:19 +00:00
README.txt Testing commit access 2012-05-24 14:20:13 +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.