This includes just enough code to build the high-level ICE IR and dump it back out again. There is a script szdiff.py that does a fuzzy diff of the input and output for verification. See the comment in szdiff.py for a description of the fuzziness.
Building llvm2ice requires LLVM headers, libs, and tools (e.g. FileCheck) to be present. These default to something like llvm_i686_linux_work/Release+Asserts/ based on the checked-out and built pnacl-llvm code; I'll try to figure out how to more automatically detect the build configuration.
"make check" runs the lit tests.
This CL has under 2000 lines of "interesting" Ice*.{h,cpp} code, plus 600 lines of llvm2ice.cpp driver code, and the rest is tests.
Here is the high-level mapping of source files to functionality:
IceDefs.h, IceTypes.h, IceTypes.cpp:
Commonly used types and utilities.
IceCfg.h, IceCfg.cpp:
Operations at the function level.
IceCfgNode.h, IceCfgNode.cpp:
Operations on basic blocks (nodes).
IceInst.h, IceInst.cpp:
Operations on instructions.
IceOperand.h, IceOperand.cpp:
Operations on operands, such as stack locations, physical registers, and constants.
BUG= none
R=jfb@chromium.org
Review URL: https://codereview.chromium.org/205613002
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| 64bit.pnacl.ll | Loading commit data... | |
| alloc.ll | Loading commit data... | |
| arith-opt.ll | Loading commit data... | |
| arithmetic-chain.ll | Loading commit data... | |
| bitcast.ll | Loading commit data... | |
| bool-opt.ll | Loading commit data... | |
| branch-simple.ll | Loading commit data... | |
| call.ll | Loading commit data... | |
| callindirect.pnacl.ll | Loading commit data... | |
| casts.ll | Loading commit data... | |
| cmp-opt.ll | Loading commit data... | |
| convert.ll | Loading commit data... | |
| empty-func.ll | Loading commit data... | |
| fp.pnacl.ll | Loading commit data... | |
| fpconst.pnacl.ll | Loading commit data... | |
| global.ll | Loading commit data... | |
| icmp-simple.ll | Loading commit data... | |
| inttoptr.ll | Loading commit data... | |
| load.ll | Loading commit data... | |
| return-int-arg.ll | Loading commit data... | |
| select-opt.ll | Loading commit data... | |
| shift.ll | Loading commit data... | |
| simple-arith.ll | Loading commit data... | |
| simple-cond.ll | Loading commit data... | |
| simple-loop.ll | Loading commit data... | |
| store.ll | Loading commit data... | |
| struct-arith.pnacl.ll | Loading commit data... | |
| switch-opt.ll | Loading commit data... | |
| unreachable.ll | Loading commit data... |