summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* TBAA: remove !tbaa from testing cases when they are not needed.Manman Ren2013-08-2116-674/+584
| | | | | | | This will make it easier to turn on struct-path aware TBAA since the metadata format will change. llvm-svn: 188944
* Adding a document to describe the MCJIT execution engine implementation.Andrew Kaylor2013-08-218-0/+183
| | | | llvm-svn: 188943
* R600: Remove unnecessary castsTom Stellard2013-08-211-8/+6
| | | | | | Spotted by Bill Wendling. llvm-svn: 188942
* No functionality change.Yunzhong Gao2013-08-211-2/+2
| | | | | | Replace "(255 & value)" with "(0xFF & value)" to improve clarity. llvm-svn: 188941
* Teach BaseIndexOffset::match to identify base pointers in loops.Juergen Ributzka2013-08-212-2/+44
| | | | | | | | | | | | | | The small utility function that pattern matches Base + Index + Offset patterns for loads and stores fails to recognize the base pointer for loads/stores from/into an array at offset 0 inside a loop. As a result DAGCombiner::MergeConsecutiveStores was not able to merge all stores. This commit fixes the issue by adding an additional pattern match and also a test case. Reviewer: Nadav llvm-svn: 188936
* ADT/Triple: Helper to determine if we are targeting the Windows CRTDavid Majnemer2013-08-211-0/+5
| | | | | | | | | | | | | | | | Summary: This support will be utilized in things like clang to help check printf format specifiers that are only valid when using the VSCRT. Reviewers: rnk, asl, chandlerc Reviewed By: chandlerc CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1455 llvm-svn: 188935
* Basic unit tests for PointerUnionDavid Blaikie2013-08-213-1/+66
| | | | llvm-svn: 188933
* Reorder headers according to lint.Bill Wendling2013-08-212-10/+6
| | | | llvm-svn: 188932
* Remove use of forbidden 'iostream' header.Bill Wendling2013-08-211-13/+11
| | | | | | Also obsessively reorder the headers to be in something closer to alphabetical order. llvm-svn: 188928
* Teach InstCombine about address spacesMatt Arsenault2013-08-217-91/+439
| | | | llvm-svn: 188926
* MC CFG: Remap enough for data too, analoguous to r188873.Ahmed Bougacha2013-08-212-1/+49
| | | | llvm-svn: 188925
* Style cleanup following David's review for r188876.Ahmed Bougacha2013-08-211-5/+4
| | | | llvm-svn: 188924
* Add testcase for r188873: MCTextAtom boundaries.Ahmed Bougacha2013-08-211-0/+39
| | | | | | | Check that they are correctly computed if the last instruction is larger than 1 byte. llvm-svn: 188923
* [CMake] Automatically pick up subdirectories in llvm/tools as 'external ↵Argyrios Kyrtzidis2013-08-212-34/+73
| | | | | | | | | projects' if they contain a 'CMakeLists.txt' file. Allow CMake to pick up external projects in llvm/tools without the need to modify the "llvm/tools/CMakeLists.txt" file. This makes it easier to work with projects that live in other repositories, without needing to specify each one in "llvm/tools/CMakeLists.txt". llvm-svn: 188921
* Add test for bitcast array ptrs with address spacesMatt Arsenault2013-08-211-0/+22
| | | | llvm-svn: 188919
* Add enforce known alignment test with address spaceMatt Arsenault2013-08-211-3/+23
| | | | llvm-svn: 188917
* Use attribute helper functionMatt Arsenault2013-08-211-2/+1
| | | | llvm-svn: 188916
* Fix typoMatt Arsenault2013-08-211-1/+1
| | | | llvm-svn: 188915
* A minor change for an obvous problem caused by r188451:Hao Liu2013-08-212-3/+3
| | | | | | | def imm0_63 : Operand<i32>, ImmLeaf<i32, [{ return Imm >= 0 && Imm < 63;}]>{ As it seems Imm <63 should be Imm <= 63. ImmLeaf is used in pattern match, but there is already a function check the shift amount range, so just remove ImmLeaf. Also add a test to check 63. llvm-svn: 188911
* Add -mcpu to two X86 tests.Joey Gouly2013-08-212-2/+2
| | | | | | These tests are failing on Haswell CPUs due to different instruction selection. llvm-svn: 188908
* Add basic YAML MC CFG testcase.Ahmed Bougacha2013-08-212-1/+87
| | | | | | Drive-by llvm-objdump cleanup (don't hardcode ToolName). llvm-svn: 188904
* Unix/Process.inc: Revert r72332, "Work around a page size issue on Cygwin."NAKAMURA Takumi2013-08-211-6/+3
| | | | | | | Offset in mmap(3) should be aligned to gepagesize(), 64k, or mmap(3) would fail. TODO: Invetigate places where 4096 would be required as pagesize, or 4096 would satisfy. llvm-svn: 188903
* Make "mov" work for all Thumb2 MOV encodingsMihai Popa2013-08-214-1/+33
| | | | | | | According to the ARM specification, "mov" is a valid mnemonic for all Thumb2 MOV encodings. To achieve this, the patch adds one instruction alias with a special range condition to avoid collision with the Thumb1 MOV. llvm-svn: 188901
* AVX-512: Added SHIFT instructions.Elena Demikhovsky2013-08-216-6/+302
| | | | llvm-svn: 188899
* [SystemZ] Define remainig *MUL_LOHI patternsRichard Sandiford2013-08-214-19/+136
| | | | | | | | | | | | | | | | | The initial port used MLG(R) for i64 UMUL_LOHI but left the other three combinations as not-legal-or-custom. Although 32x32->{32,32} multiplications exist, they're not as quick as doing a normal 64-bit multiplication, so it didn't seem like i32 SMUL_LOHI and UMUL_LOHI would be useful. There's also no direct instruction for i64 SMUL_LOHI, so it needs to be implemented in terms of UMUL_LOHI. However, not defining these patterns means that we don't convert division by a constant into multiplication, so this patch fills in the other cases. The new i64 SMUL_LOHI sequence is simpler than the one that we used previously for 64x64->128 multiplication, so int-mul-08.ll now tests the full sequence. llvm-svn: 188898
* MCFunction.h: Prune \returns to fix a warning in r188881. [-Wdocumentation]NAKAMURA Takumi2013-08-211-1/+0
| | | | llvm-svn: 188897
* [mips][msa] Matheus Almeida pointed out a silly mistake in r188893. Fixed it.Daniel Sanders2013-08-211-1/+1
| | | | | | | | | | I accidentally changed the encoding of the MSA registers to zero instead of 0 to 31. This change restores the encoding the registers had prior to r188893. This didn't show up in the existing tests because direct-object emission isn't implemented yet for MSA. llvm-svn: 188896
* [SystemZ] Use FI[EDX]BRA for codegenRichard Sandiford2013-08-214-6/+354
| | | | llvm-svn: 188895
* [SystemZ] Add FI[EDX]BRARichard Sandiford2013-08-219-10/+199
| | | | | | | These are extensions of the existing FI[EDX]BR instructions, but use a spare bit to suppress inexact conditions. llvm-svn: 188894
* [mips][msa] Define registers using foreachDaniel Sanders2013-08-211-32/+3
| | | | | | No functional change llvm-svn: 188893
* MC CFG: Add YAML MCModule representation to enable MC CFG testing.Ahmed Bougacha2013-08-214-9/+532
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MC CFG: Support disassembly at arbitrary addresses in MCObjectDisassembler.Ahmed Bougacha2013-08-212-7/+236
| | | | llvm-svn: 188889
* MC CFG: Use data structures more appropriate than std::set.Ahmed Bougacha2013-08-211-10/+16
| | | | llvm-svn: 188888
* MC CFG: Add an MCObjectSymbolizer in the MCObjectDisassembler.Ahmed Bougacha2013-08-212-1/+11
| | | | | | Used to detect calls to function symbol stubs (future commit). llvm-svn: 188887
* MC CFG: Add MCObjectDisassembler Mach-O implementation.Ahmed Bougacha2013-08-212-0/+120
| | | | | | | | | | Supports: - entrypoint, using LC_MAIN. - static ctors/dtors, using __mod_{init,exit}_func - translation between effective and object load address, using dyld's VM address slide. llvm-svn: 188886
* Add Mach-O entry_point_command declaration.Ahmed Bougacha2013-08-211-0/+7
| | | | llvm-svn: 188885
* MC CFG: Add "dynamic disassembly" support to MCObjectDisassembler.Ahmed Bougacha2013-08-212-1/+27
| | | | | | | | It can now disassemble code in situations where the effective load address is different than the load address declared in the object file. This happens for PIC, hence "dynamic". llvm-svn: 188884
* MC CFG: When disassembly is impossible, fallback to data bytes.Ahmed Bougacha2013-08-211-16/+30
| | | | | | | | | This is the behavior of sequential disassemblers (llvm-objdump, ...), when there is no instruction size hint (fixed-length, ...) While there, also do some minor cleanup. llvm-svn: 188883
* MC CFG: Add MCObjectDisassembler support for entrypoint + static ctors.Ahmed Bougacha2013-08-212-6/+73
| | | | | | For now, this isn't implemented for any format. llvm-svn: 188882
* MC CFG: Split MCBasicBlocks to mirror atom splitting.Ahmed Bougacha2013-08-215-2/+65
| | | | | | | | When an MCTextAtom is split, all MCBasicBlocks backed by it are automatically split, with a fallthrough between both blocks, and the successors moved to the second block. llvm-svn: 188881
* MC CFG: Add a few needed methods, mainly MCModule::findFirstAtomAfter.Ahmed Bougacha2013-08-214-5/+30
| | | | | | While there, do some minor cleanup. llvm-svn: 188880
* MC: ObjectSymbolizer can now recognize external function stubs.Ahmed Bougacha2013-08-214-1/+99
| | | | | | | Only implemented in the Mach-O ObjectSymbolizer. The testcase sadly introduces a new binary. llvm-svn: 188879
* MC: Refactor ObjectSymbolizer to make relocation/section info generation lazy.Ahmed Bougacha2013-08-212-113/+136
| | | | llvm-svn: 188878
* MC CFG: Add entrypoint address to MCModule.Ahmed Bougacha2013-08-211-1/+7
| | | | llvm-svn: 188877
* MC CFG: Add more MCFunction container methods (find, empty).Ahmed Bougacha2013-08-212-2/+20
| | | | llvm-svn: 188876
* MC CFG: Keep pointer to parent MCModule in created MCFunctions.Ahmed Bougacha2013-08-214-10/+16
| | | | | | Also, drive-by cleaning around createFunction. llvm-svn: 188875
* MC CFG: Don't insert preds/succs again.Ahmed Bougacha2013-08-211-2/+4
| | | | llvm-svn: 188874
* MC CFG: Remap enough for the inserted instruction.Ahmed Bougacha2013-08-211-2/+2
| | | | llvm-svn: 188873
* MC CFG: uint64_t -> size_t for vector size.Ahmed Bougacha2013-08-211-1/+1
| | | | llvm-svn: 188872
* MC CFG: Add a getter for MCDataAtom's data array.Ahmed Bougacha2013-08-211-1/+5
| | | | | | While there, switch to new-style documentation. llvm-svn: 188871
OpenPOWER on IntegriCloud