Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Move CFG building code to a new lib/MC/MCAnalysis library. | Rafael Espindola | 2014-07-02 | 1 | -464/+0 |
| | | | | | | | The new library is 150KB on a Release+Asserts build, so it is quiet a bit of code that regular users of MC don't need to link with now. llvm-svn: 212209 | ||||
* | Remove 'using std::errro_code' from lib. | Rafael Espindola | 2014-06-13 | 1 | -2/+1 |
| | | | | llvm-svn: 210871 | ||||
* | Don't use 'using std::error_code' in include/llvm. | Rafael Espindola | 2014-06-12 | 1 | -0/+1 |
| | | | | | | This should make sure that most new uses use the std prefix. llvm-svn: 210835 | ||||
* | raw_ostream: Forward declare OpenFlags and include FileSystem.h only where ↵ | Benjamin Kramer | 2014-04-29 | 1 | -0/+1 |
| | | | | | | necessary. llvm-svn: 207593 | ||||
* | Use unique_ptr to own MCFunctions within MCModule. | David Blaikie | 2014-04-15 | 1 | -5/+5 |
| | | | | | | | | MCModule's ctor had to be moved out of line so the definition of MCFunction was available. (ctor requires the dtor of members (in case the ctor throws) which required access to the dtor of MCFunction) llvm-svn: 206244 | ||||
* | Use std::unique_ptr to manage MCBasicBlocks in MCFunction. | David Blaikie | 2014-04-15 | 1 | -6/+6 |
| | | | | llvm-svn: 206242 | ||||
* | YAMLIO: Allow scalars to dictate quotation rules | David Majnemer | 2014-04-10 | 1 | -0/+2 |
| | | | | | | | Introduce ScalarTraits::mustQuote which determines whether or not a StringRef needs quoting before it is acceptable to output. llvm-svn: 205955 | ||||
* | Replace OwningPtr<T> with std::unique_ptr<T>. | Ahmed Charles | 2014-03-06 | 1 | -1/+1 |
| | | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083 | ||||
* | MC CFG: Add YAML MCModule representation to enable MC CFG testing. | Ahmed Bougacha | 2013-08-21 | 1 | -0/+461 |
Like yaml ObjectFiles, this will be very useful for testing the MC CFG implementation (mostly MCObjectDisassembler), by matching the output with YAML, and for potential users of the MC CFG, by using it as an input. There isn't much to the actual format, it is just a serialization of the MCModule class. Of note: - Basic block references (pred/succ, ..) are represented by the BB's start address. - Just as in the MC CFG, instructions are MCInsts with a size. - Operands have a prefix representing the type (only register and immediate supported here). - Instruction opcodes are represented by their names; enum values aren't stable, enum names mostly are: usually, a change to a name would need lots of changes in the backend anyway. Same with registers. All in all, an example is better than 1000 words, here goes: A simple binary: Disassembly of section __TEXT,__text: _main: 100000f9c: 48 8b 46 08 movq 8(%rsi), %rax 100000fa0: 0f be 00 movsbl (%rax), %eax 100000fa3: 3b 04 25 48 00 00 00 cmpl 72, %eax 100000faa: 0f 8c 07 00 00 00 jl 7 <.Lend> 100000fb0: 2b 04 25 48 00 00 00 subl 72, %eax .Lend: 100000fb7: c3 ret And the (pretty verbose) generated YAML: --- Atoms: - StartAddress: 0x0000000100000F9C Size: 20 Type: Text Content: - Inst: MOV64rm Size: 4 Ops: [ RRAX, RRSI, I1, R, I8, R ] - Inst: MOVSX32rm8 Size: 3 Ops: [ REAX, RRAX, I1, R, I0, R ] - Inst: CMP32rm Size: 7 Ops: [ REAX, R, I1, R, I72, R ] - Inst: JL_4 Size: 6 Ops: [ I7 ] - StartAddress: 0x0000000100000FB0 Size: 7 Type: Text Content: - Inst: SUB32rm Size: 7 Ops: [ REAX, REAX, R, I1, R, I72, R ] - StartAddress: 0x0000000100000FB7 Size: 1 Type: Text Content: - Inst: RET Size: 1 Ops: [ ] Functions: - Name: __text BasicBlocks: - Address: 0x0000000100000F9C Preds: [ ] Succs: [ 0x0000000100000FB7, 0x0000000100000FB0 ] <snip> ... llvm-svn: 188890 |