llvm-6502/lib/ExecutionEngine
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
..
IntelJITEvents Make IntelJITEvents and OProfileJIT as optional libraries and add 2012-05-07 19:38:40 +00:00
Interpreter PR1255: Case Ranges 2012-05-28 12:39:09 +00:00
JIT Fix some formatting, grammar and style issues and add a couple of missing comments. 2012-04-29 12:40:47 +00:00
MCJIT Added LLIMCJITMemoryManager to the lli. This manager will be used for MCJIT instead of DefaultJIMMemoryManager. 2012-05-16 18:50:11 +00:00
OProfileJIT Make IntelJITEvents and OProfileJIT as optional libraries and add 2012-05-07 19:38:40 +00:00
RuntimeDyld RuntimeDyld cleanup: 2012-05-01 10:41:12 +00:00
CMakeLists.txt Add profiling support for Intel Parallel Amplifier XE (VTune) for JITted code in LLVM. 2012-03-13 08:33:15 +00:00
EventListenerCommon.h Add profiling support for Intel Parallel Amplifier XE (VTune) for JITted code in LLVM. 2012-03-13 08:33:15 +00:00
ExecutionEngine.cpp EngineBuilder::create is expected to take ownership of the TargetMachine passed to it. Delete it on error or when we create an interpreter that doesn't need it. 2012-04-08 14:53:14 +00:00
ExecutionEngineBindings.cpp More dead code removal (using -Wunreachable-code) 2012-01-20 21:51:11 +00:00
LLVMBuild.txt Add profiling support for Intel Parallel Amplifier XE (VTune) for JITted code in LLVM. 2012-03-13 08:33:15 +00:00
Makefile Add profiling support for Intel Parallel Amplifier XE (VTune) for JITted code in LLVM. 2012-03-13 08:33:15 +00:00
TargetSelect.cpp Make it so that the MArch, MCPU, MAttrs passed to EngineBuilder are actually used. 2012-05-21 16:57:17 +00:00