summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [mips] Update namespace.Matheus Almeida2014-03-211-5/+1
| | | | | | | We should be using the llvm namespace and not an anonymous namespace in a header file. llvm-svn: 204450
* [RuntimeDyld] Allow processRelocationRef to process more than one relocation ↵Juergen Ributzka2014-03-218-46/+66
| | | | | | | | | | | | | entry at a time. Some targets require more than one relocation entry to perform a relocation. This change allows processRelocationRef to process more than one relocation entry at a time by passing the relocation iterator itself instead of just the relocation entry. Related to <rdar://problem/16199095> llvm-svn: 204439
* [Constant Hoisting] Make the constant materialization cost operand dependentJuergen Ributzka2014-03-213-30/+47
| | | | | | | | | Extend the target hook to take also the operand index into account when calculating the cost of the constant materialization. Related to <rdar://problem/16381500> llvm-svn: 204435
* [Constant Hoisting] Lazily compute the idom and cache the result.Juergen Ributzka2014-03-211-4/+43
| | | | | | Related to <rdar://problem/16381500> llvm-svn: 204434
* [Constant Hoisting] Change the algorithm to only track constants for ↵Juergen Ributzka2014-03-211-239/+321
| | | | | | | | | | | | | | | | | | | | | | | | instructions. Originally the algorithm would search for expensive constants and track their users, which could be instructions and constant expressions. This change only tracks the constants for instructions, but constant expressions are indirectly covered too. If an operand is an constant expression, then we look through the expression to find anny expensive constants. The algorithm keep now track of the instruction and the operand index where the constant is used. This allows more precise hoisting of constant materialization code for PHI instructions, because we only hoist to the basic block of the incoming operand. Before we had to find the idom of all PHI operands and hoist the materialization code there. This also makes updating of instructions easier. Before we had to keep track of the original constant, find it in the instructions, and then replace it. Now we can just simply update the operand. Related to <rdar://problem/16381500> llvm-svn: 204433
* [Constant Hoisting] Fix capitalization of function names.Juergen Ributzka2014-03-211-33/+34
| | | | llvm-svn: 204432
* [Constant Hoisting] Replace the MapVector with a separate Map and Vector to ↵Juergen Ributzka2014-03-211-38/+51
| | | | | | | | | | | keep track of constant candidates. This simplifies working with the constant candidates and removes the tight coupling between the map and the vector. Related to <rdar://problem/16381500> llvm-svn: 204431
* MCParser: add an assertionSaleem Abdulrasool2014-03-211-1/+3
| | | | | | | Add an assertion that the section is not NULL. Potential NULL pointer dereference identified by clang static analyzer. llvm-svn: 204429
* This reverts commit r203762, "ARM: support emission of complex SO expressions".Jiangning Liu2014-03-211-14/+2
| | | | | | The commit r203762 introduced silent failure for complext SO expression, and it's even worse than compiler crash. llvm-svn: 204427
* [Support] Make sure LockFileManager works correctly with relative paths.Argyrios Kyrtzidis2014-03-211-1/+3
| | | | llvm-svn: 204426
* Fix an assertion caused by using inline asm with indirect register inputs.Kevin Qin2014-03-211-1/+1
| | | | llvm-svn: 204425
* [AArch64] Remove .data_region directive from AArch64.Kevin Qin2014-03-211-2/+0
| | | | | | | | | .data_region is only used in Darwin, so it shouldn't be generated for other OS. Currently AArch64 doesn't support darwin yet, so I removed it from AArch64. When Darwin is supported someday, we can add it back and associate it with Darwin. llvm-svn: 204424
* [Support] Make sure sys::fs::remove can remove symbolic links and make sure ↵Argyrios Kyrtzidis2014-03-212-8/+5
| | | | | | LockFileManager can handle a symbolic link that points nowhere. llvm-svn: 204422
* Object/COFF: Support large relocation table.Rui Ueyama2014-03-211-11/+32
| | | | | | | | | | | | | | | | NumberOfRelocations field in COFF section table is only 16-bit wide. If an object has more than 65535 relocations, the number of relocations is stored to VirtualAddress field in the first relocation field, and a special flag (IMAGE_SCN_LNK_NRELOC_OVFL) is set to Characteristics field. In test we cheated a bit. I made up a test file so that it has IMAGE_SCN_LNK_NRELOC_OVFL flag but the number of relocations is much smaller than 65535. This is to avoid checking in a large test file just to test a file with many relocations. Differential Revision: http://llvm-reviews.chandlerc.com/D3139 llvm-svn: 204418
* Fix PR19136: [ARM] Fix Folding SP Update into vpush/vpopWeiming Zhao2014-03-201-3/+13
| | | | | | | | | | | Sicne MBB->computeRegisterLivenes() returns Dead for sub regs like s0, d0 is used in vpop instead of updating sp, which causes s0 dead before its use. This patch checks the liveness of each subreg to make sure the reg is actually dead. llvm-svn: 204411
* Don't use EmitAbsValue with symbol references.Rafael Espindola2014-03-202-6/+6
| | | | | | | | | | | | | | | The function exists to force an expression to be absolute, but there it is not possible to force a symbol reference since a = b .long a means something else. This is an alternative fix for pr9951 that uses an assert. It then deletes the old pr9951 test that was testing nothing already. llvm-svn: 204399
* Add an option to MCJIT to have it forward all sections to theLang Hames2014-03-203-17/+44
| | | | | | | | | | | | | | | | | | | | | | RTDyldMemoryManager, regardless of whether it thinks they're "required for execution". Currently, RuntimeDyld only passes sections that are "required for execution" to the RTDyldMemoryManager, and takes "required for execution" to mean exactly "contains symbols or relocations". There are two problems with this: (1) It can drop sections with anonymous data that is referenced by code. (2) It leaves the JIT client no way to inspect interesting sections that aren't actually required to run the program (e.g dwarf sections). A test case is still in the works. Future work: We may want to replace this with a generic section filtering mechanism, but that will require more consideration. For now, this flag at least allows clients to volunteer to do the filtering themselves. Fixes <rdar://problem/15177691>. llvm-svn: 204398
* Revert "[Constant Hoisting] Extend coverage of the constant hoisting pass."Juergen Ributzka2014-03-203-431/+282
| | | | | | I will break this up into smaller pieces for review and recommit. llvm-svn: 204393
* [Constant Hoisting] Extend coverage of the constant hoisting pass.Juergen Ributzka2014-03-203-282/+431
| | | | | | | | | This commit extends the coverage of the constant hoisting pass, adds additonal debug output and updates the function names according to the style guide. Related to <rdar://problem/16381500> llvm-svn: 204389
* Remove LowerInvoke's obsolete "-enable-correct-eh-support" optionMark Seaborn2014-03-202-508/+9
| | | | | | | | | | | | | | | This option caused LowerInvoke to generate code using SJLJ-based exception handling, but there is no code left that interprets the jmp_buf stack that the resulting code maintained (llvm.sjljeh.jblist). This option has been obsolete for a while, and replaced by SjLjEHPrepare. This leaves the default behaviour of LowerInvoke, which is to convert invokes to calls. Differential Revision: http://llvm-reviews.chandlerc.com/D3136 llvm-svn: 204388
* Typo.Eric Christopher2014-03-201-1/+1
| | | | llvm-svn: 204378
* Reapply DW_AT_low/high_pc patch:Eric Christopher2014-03-204-81/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the range machinery for DW_AT_ranges and DW_AT_high/lo_pc. This commit moves us from a single range per subprogram to extending ranges if we are: a) In the same section, and b) In the same enclosing CU. This means we have more fine grained ranges for compile units, and fewer ranges overall when we have multiple functions in the same CU adjacent to each other in the object file. Also remove all of the earlier hacks around this functionality for function sections etc. Also update all of the testcases to take into account the merging functionality. with a fix for location entries in the debug_loc section: Make sure that debug loc entries are relative to the low_pc of the compile unit. This means that when we only have a single range that the offset should be just relative to the low_pc of the unit, for multiple ranges for a CU this means that we'll be relative to 0 which we emit along with DW_AT_ranges. This mostly shows up with linked binaries, so add a testcase with multiple CUs so that our location is going to be offset of a CU with a non-zero low_pc. llvm-svn: 204377
* Remove dead and incorrect code.Rafael Espindola2014-03-201-14/+1
| | | | | | is_symlink was always false since it was using stat instead of lstat. llvm-svn: 204361
* Add comments from Eric's review of r204094.David Blaikie2014-03-201-0/+5
| | | | llvm-svn: 204358
* R600: Remove unused method declaration.Matt Arsenault2014-03-201-6/+0
| | | | llvm-svn: 204357
* [MIPS] Add cpu octeon and some instructionsKai Nacke2014-03-2010-6/+118
| | | | | | | | | | The Octeon cpu from Cavium Networks is mips64r2 based and has an extended instruction set. In order to utilize this with LLVM, a new cpu feature "octeon" and a subtarget feature "cnmips" is added. A small set of new instructions (baddu, dmul, pop, dpop, seq, sne) is also added. LLVM generates dmul, pop and dpop instructions with option -mcpu=octeon or -mattr=+cnmips. llvm-svn: 204337
* [ASan] Do not instrument globals from the llvm.metadata section.Alexander Potapenko2014-03-201-0/+2
| | | | | | Fixes https://code.google.com/p/address-sanitizer/issues/detail?id=279. llvm-svn: 204331
* Provide an operand for microMIPS wait instruction.Zoran Jovanovic2014-03-203-5/+18
| | | | llvm-svn: 204329
* Implementation of microMIPS 16-bit instructions MOVE and JALR.Zoran Jovanovic2014-03-207-10/+117
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D3112 llvm-svn: 204325
* Mark alias symbols as microMIPS if necessary. Differential Revision: ↵Zoran Jovanovic2014-03-206-5/+36
| | | | | | http://llvm-reviews.chandlerc.com/D3080 llvm-svn: 204323
* [mips] Splitting up class definition from implementation.Matheus Almeida2014-03-202-129/+171
| | | | | | | | Also removed some unnecessary #includes. No functional changes. llvm-svn: 204320
* Add llvm_unreachable after fully-covered switches to appease GCCAlexey Samsonov2014-03-202-0/+2
| | | | llvm-svn: 204318
* Object: Don't double-escape empty hexdataDavid Majnemer2014-03-201-3/+1
| | | | | | | We would emit a pair of double quotes inside a pair of single quotes. Just use a pair of single quotes. llvm-svn: 204312
* Reapply 'ARM IAS: support .thumb_set'Saleem Abdulrasool2014-03-202-4/+81
| | | | | | | Re-apply the change after it was reverted to do conflicts due to another change being reverted. llvm-svn: 204306
* [X86] Check return value of readSIB in disassembler so errors propagate. In ↵Craig Topper2014-03-201-5/+2
| | | | | | particular this makes a too short instruction with a missing SIB byte fail. llvm-svn: 204305
* [ARM]Fix an assertion failure in A15SDOptimizer about DPair reg class by ↵Hao Liu2014-03-201-3/+9
| | | | | | treating DPair as QPR. llvm-svn: 204304
* Look through variables when computing relocations.Rafael Espindola2014-03-209-33/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given bar = foo + 4 .long bar MC would eat the 4. GNU as includes it in the relocation. The rule seems to be that a variable that defines a symbol is used in the relocation and one that does not define a symbol is evaluated and the result included in the relocation. Fixing this unfortunately required some other changes: * Since the variable is now evaluated, it would prevent the ELF writer from noticing the weakref marker the elf streamer uses. This patch then replaces that with a VariantKind in MCSymbolRefExpr. * Using VariantKind then requires us to look past other VariantKind to see .weakref bar,foo call bar@PLT doing this also fixes zed = foo +2 call zed@PLT so that is a good thing. * Looking past VariantKind means that the relocation selection has to use the fixup instead of the target. This is a reboot of the previous fixes for MC. I will watch the sanitizer buildbot and wait for a build before adding back the previous fixes. llvm-svn: 204294
* Revert "Use the range machinery for DW_AT_ranges and DW_AT_high/lo_pc."Eric Christopher2014-03-204-101/+61
| | | | | | | | This appears to trigger failures with optimization and function arguments somehow. This reverts commit r204277. llvm-svn: 204286
* Use the range machinery for DW_AT_ranges and DW_AT_high/lo_pc.Eric Christopher2014-03-194-61/+101
| | | | | | | | | | | | | | | | | | This commit moves us from a single range per subprogram to extending ranges if we are: a) In the same section, and b) In the same enclosing CU. This means we have more fine grained ranges for compile units, and fewer ranges overall when we have multiple functions in the same CU adjacent to each other in the object file. Also remove all of the earlier hacks around this functionality for function sections etc. Also update all of the testcases to take into account the merging functionality. llvm-svn: 204277
* R600/SI: Add unused LDS 2 form instructions.Matt Arsenault2014-03-192-1/+35
| | | | llvm-svn: 204275
* R600/SI: Add support for 64-bit LDS writesMatt Arsenault2014-03-191-1/+4
| | | | llvm-svn: 204274
* R600/SI: Add support for 64-bit LDS loads.Matt Arsenault2014-03-191-0/+2
| | | | | | | v2: -Use correct opcode for DS_READ_64 llvm-svn: 204273
* R600/SI: Match i16 immediate offset of LDS instructions.Matt Arsenault2014-03-192-20/+39
| | | | llvm-svn: 204272
* R600/SI: Don't display the GDS bit.Matt Arsenault2014-03-191-3/+3
| | | | | | | | It isn't actually used now, and probably never will be, plus it makes tests less annoying. I also think SC prints GDS instructions as a separate instruction name. llvm-svn: 204270
* R600/SI: Merge offset0 and offset1 fields for single address DS instructions v2Matt Arsenault2014-03-192-18/+27
| | | | | | | | | Also remove unused data fields from the DS_Load_Helper class. v2: - Merge fields for DS_WRITE llvm-svn: 204269
* Fix comment (PR19188)Hans Wennborg2014-03-191-1/+1
| | | | llvm-svn: 204256
* [mips] 80-column.Matheus Almeida2014-03-191-8/+12
| | | | llvm-svn: 204252
* Set debug info for instructions inserted in SplitBlockAndInsertIfThen.Evgeniy Stepanov2014-03-192-2/+6
| | | | llvm-svn: 204230
* Prune includes in X86 target.Craig Topper2014-03-1915-32/+18
| | | | llvm-svn: 204216
* Object: Provide a richer means of describing auxiliary symbolsDavid Majnemer2014-03-192-4/+101
| | | | | | | | | | | | | | | | The current state of affairs has auxiliary symbols described as a big bag of bytes. This is less than satisfying, it detracts from the YAML file as being human readable. Instead, allow for symbols to optionally contain their auxiliary data. This allows us to have a much higher level way of describing things like weak symbols, function definitions and section definitions. This depends on D3105. Differential Revision: http://llvm-reviews.chandlerc.com/D3092 llvm-svn: 204214
OpenPOWER on IntegriCloud